-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Konstantin,
On 3/26/13 11:08 AM, Konstantin Kolinko wrote: > 2. Are you interested in GET/POST requests, or HEAD requests? > > HEAD requests were fixed by this commit, from 5 days ago > http://svn.apache.org/r1459087 I am dealing almost entirely with POST requests. > 3. Tomcat is already able to provide Content-Length header when > all response fits into a buffer. > > But, if an explicit flush() is called, Tomcat has to start sending > data (usually using chunked encoding) and thus content length is > not known at the time when response headers are being sent. It seems I am flushing the buffer twice: once after emitting the XML header (processing instruction and document element) and then once again just before the end of the doPost method. I'll try removing those to see if I can get a Content-Length in the response. If that works, I'll do a bunch of testing to see if the lack of flush presents a problem: I want my servlet to handle all interaction with the client -- that is, the container shouldn't respond with text/plain or text/html or anything like that. I should be handling all exceptions except for IOExceptions writing to the OutputStream, so that probably isn't a problem. Thanks, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRVNi5AAoJEBzwKT+lPKRYc0wP/2S57Ac0RvBSDxUb8UAYUUom mE5Y3q/JsyKMBeoM4n6KXfyuIwbYFsCeBPbi+d5WolqV8C9LvHD6rDpIEAMd+TUX ZWoA2uivNvDoG9o6Kw53OfNaWwxjWnUVsRLnekp5QbnbABxo+3TeGPii2ErU0Btf e5RAkkRtyotzuVFmGKn+/HpbMUhq0z4WZD0sHH/nFbQRNZjK+E7u8UrW/m/zTufm YJJcKV7hF8VcndYT35qsicA7djxQ+KXXpDHr92nCZ5BVWNygxtzTwFO34+7Hed52 8qq0IjO2tdmOMc48EBVxckTFJiEWzZkLrU5dem62Xcf1wmQTrsMLIeKdGxR03e3h ZWSD7NO5lTA4keX2EbTWJMxdgnf6R7R7HJ5r3QrdUaffgPFesY9u05YJMYivoHvS LqTB7l3kw3BR4xhoF1tWQNUxS5i04ApeX1ShmSH+81/cwmAz0OIEpzMPl/2Mic5i z8zpQQ5oEx8GBSRru4cZHtZHPJzzIRwQU5XKzEFECZ8sNgKxUALKyJI3+9hKO3X7 maCQJ0q1E9maETPWFgQQBJli/waRJ5KBXLZp072V26z7uWRuxDeXptiLY+MRuzLu e2lcK70V/n7MYUPVnbXi5B30QymGLkdB9MemfyEc4qdYD1UhrgeyIcOcnm2D/mT1 oleOI/I98f+lOCZAF+P+ =wx+V -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org