tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Cosentino <matt...@yahoo.com>
Subject Re: Erratic HTTP response behavior
Date Sat, 26 May 2007 02:04:02 GMT
Actually, it did look like that, the "\r\n" codes were removed for some reason when I sent
the email.

----- Original Message ----
From: Bill Barker <wbarker@wilshire.com>
To: users@tomcat.apache.org
Sent: Friday, May 25, 2007 8:12:04 PM
Subject: Re: Erratic HTTP response behavior


"Christopher Schultz" <chris@christopherschultz.net> wrote in message 
news:46574F02.4030009@christopherschultz.net...
> -----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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 




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






 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097

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


Mime
View raw message