1

I was about to test chunked transfer encoding with the following simple Perl script:

print "Content-type: text/plain\n";
print "Transfer-Encoding: chunked\n\n";
print "11\n\n";
print "0123456789ABCDEF\n";
print "11\n\n";
print "0123456789ABCDEF\n";
print "\n\n";

But I experience a browser error

Error 321 (net::ERR_INVALID_CHUNKED_ENCODING): Unknown error.

What is wrong with the above code?

1

1 Answer 1

2

The last (zero-sized) chunk is missing.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.