-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 wr,
On 9/29/2011 4:49 PM, rapponcape wrote: >> Aha, the client is using HTTP 1.0 and not 1.1. This could be one >> reason for Tomcat closing the connection. See below. > > When I reconfigure and put Apache in front of Tomcat and use a > jkmount with AJP connector, response is normal and without error. > Appears to only happen when tomcat is standalone. That's probably because Apache httpd is proxying the HTTP/1.0 request and converting it into an HTTP/1.1 request and managing the chunked response itself. Or, possibly, httpd is buffering the entire response before sending the headers to the client and can provide a content-length header. Have you looked at the conversation between httpd and Tomcat? >>> You see: no Content-Length header. I > > I do see Content-Length in the POST header Rainer was talking about the response, not the request. Seems pretty clear that HTTP/1.0 + no content-length = problem. You have a few options: 1. Use Apache httpd in the middle. That may not always work even though it worked in your tests. 2. Buffer the response on the server in order to determine the content-length, and send that in your response. 3. Have your clients use HTTP 1.1. Honestly, I'm unclear as to why there are so many clients out there that only use HTTP 1.0. I guess there are some features that aren't dumb-client-friendly (chunking, for instance) and it's easier to implement. Boo. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6E3qgACgkQ9CaO5/Lv0PByWACaAoJqRQjc2by/e70lrXK51fb+ Y4UAn0rDFDND3DBvozYrXlrzQ3M05YRN =MWT/ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org