"Christopher Schultz" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Matt,
>
> You're right, this /is/ erratic behavior. I think something is going
> wrong with your headers or something:
>
> Matt Cosentino wrote:
>> </body></html>0 HTTP/1.1 200 OKServer: 
>> Apache-Coyote/1.1Transfer-Encoding: chunkedDate: Fri, 18 May 2007 
>> 22:35:13 GMT
>
> Your response headers appear to be after the body of the response.
> Either that or the headers I see there are supposed to be the headers
> from the next chunk and/or request in a keepalive request.
>

Indeed :).  This is the start of the next response in the pipeline, and 
should look like:
</body></html>
0
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
Date: Fri, 18 May 2007 22:35:13 GMT

It looks like some 'friendly' intermediate is compressing out the "\r\n" 
codes that are needed to interpret 'chunked'.  To not use 'chunked', you 
have to set the Content-Length yourself (or have only very small pages and 
don't call flush).  If your pages aren't too huge, and you don't have too 
high of concurrency, it is pretty easy to write a Filter that wraps the 
response to hold the output in memory until it is all there, and then set 
the Content-Length before passing it back to the browser.

> Are you intending to use "chunked" responses? 'Cause it looks like they
> are being used. There was some in-depth discussion of chunked responses
> somewhat recently on the list. Perhaps you could take a look at that for
> some reference points (but I'm not saying that it will solve your 
> problem).
>
> I think the problem might be that you are getting chunked encoding for
> some reason, but you don't really want it.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGV08C9CaO5/Lv0PARArfQAJoD+kMZLUVWthGyRuv0NWKIKSuXcACfYh+I
> sJuvF8+a8MgIcIu3gd1hGak=
> =u9oS
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to