Re: problem with chunked encoding in http1.1

My problem is now I
> am using transfer chunked encoding and having persistent connection. I
> know how to handle the chunked response.How we should handle different
> of response like what will be the delimiter for one chunk and all this.No
> where on net I could find the real time example. Can somebody explain me
> we do handle it.It will be really nice if somebody can send me the example
> chunk response which will have more then one chunk of response.

Why not just connect to a server, send a request, and record the response in
a file?  This will give an example from a real web server (I would include
an example in this message, but a multi-chunk message would be too large).
Also, have you read the section of the HTTP/1.1 RFC on chunked transfer
encoding?  It's basically just a hex number (chunk length), newline,
content, another hex number (another chunk length), another newline,
content, then a 0 after the last chunk.  There are optional headers that may
be in there too, so check the RFC to get the full details and some
imlementations like to add superfluous characters (spaces) after the chunk
length and before the newline.

Also, as a response to earlier messages as to why to avoid chunked transfer
encoding--it's simple, chunked transfer encoding is needlessly complicated,
and is not even needed for persitent connections.  HTTP/1.0 supports
persistent connections with the "Connection" field set at "Keep-Alive" and
by using the "Content-Length" field to specify the file boundry.

Received on Thursday, 5 July 2001 18:37:34 UTC