tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Multiple GETs on an SSLSocket
Date Wed, 13 Dec 2000 01:55:39 GMT
horn_ken@jpmorgan.com wrote:

> Chunking is a transfer encoding, introduced in HTTP 1.1.  In 1.0, the
> server can set a header, at the start of the stream like:
>
> Content-length: 400\r\n
> \r\n
> ....400 bytes of content ....
>
> Meaning 400 bytes in the body. The problem with this is that the server
> needs to know, at the start of the transfer how big the content is going to
> be, with static files this is OK, but with dynamic content, it means that
> the server would have to generate all content, work out the size of the
> buffer, and then send it. In 1.1 to avoid this, a new header:
>
> Transfer-encoding: chunked\r\n
> \r\n
> 200\r\n
> ... 0x200 bytes of content ...
> 023\r\n
> ... 0x023 bytes of content ....
> \r\n
> extra headers...!\r\n
> \r\n
>
> (may have got some of the new lines missing.. it's a while since i did
> this)
> is used, this allows the content to be streamed in "chunks".
>
> If you want chunked output, try using a HTTP 1.1 GET request.
>

Just as a note, if you are running under an HTTP/1.1 server (such as Apache, or
Tomcat 4.0 in stand-alone mode), the server takes care of all this for you from
the server out to the client.

>
> Ken.
>

Craig McClanahan



Mime
View raw message