Re: Keep Alive handling
Does Tomcat support Keep Alive, as a stand alone server, for multiple Client POST requests to different servlet paths where both request and response are Transfer-Encoding: chunked? Is there a definition somewhere of when tomcat will drop a connection when keep-alive is specified? Thanks. PK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Keep Alive handling
Anyway - I answered my own question. I wrote a test, Keep Alive works fine with chunked content. If anyone wants the test code let me know. (should I post it?) It is small - about 150 lines worth, all java. PK Does Tomcat support Keep Alive, as a stand alone server, for multiple Client POST requests to different servlet paths where both request and response are Transfer-Encoding: chunked? Is there a definition somewhere of when tomcat will drop a connection when keep-alive is specified? Thanks. PK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Keep Alive handling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, Peter Kennard wrote: Anyway - I answered my own question. I wrote a test, Keep Alive works fine with chunked content. So... what was the problem? For days you've been railing against Tomcat for not supporting this properly. Is there something that you overlooked? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF9aru9CaO5/Lv0PARApD2AJ0VyMgAbLB5bbQKUPQLmFWkVxSP0QCfQQfO nWs/nWmRab0FYuVE9+8jcTw= =F1Cy -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]
Re: Keep Alive handling
I answered my own question here: The client must send the *complete* sequence \r\n0\r\n\r\n or tomcat *will* hang attempting to read the last \r\n after the last zero length chunk No one including myself caught this. PK - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Keep Alive handling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, Peter Kennard wrote: The 0 is the hex digint Zero the terminal EOD chunk is defined in HTTP1.1 as a chunk with a length of 0. This is what terminates the data for the current request. EOF? Right, I forgot that you were using chunked requests. I tried explicitly putting in the keep alive header, though it is deprecated in HTTP1.1 and is the default value if no header is supplied. As expected this has no (different) effect. Well, Connection: close is supposed to cause the server to close the connection after the request has been fulfilled, but it looks like your experience is that TC closes the connection no matter what. What if you use a non-chunked request? You asked already and the response was that TC basically doesn't handle chunked requests. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF9BKJ9CaO5/Lv0PARAuliAKCF9mpJPVp72ICgOeLwxNOhBjsVSgCePCZk LKTxJt2y4DTJkumQQU2gDGs= =tSB9 -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]
Re: Keep Alive handling
What if you use a non-chunked request? You asked already and the response was that TC basically doesn't handle chunked requests. TC handles chunked requests in all ways except that it doesn't have a methodology in the servlet API (EOFException etc) for notifying you if you try to read beyond EOD. Chunking is a requirement of HTTP1.1. TC appears at least from what I can tell. to always close the socket on completion of a request - unless I am missing some critical configuration item or doing something that disables it. Anyone know where exactly what it does with keep-alive under what circumstances is documented? (Yes I know if I tackle the big job of understanding the source as if I wrote it I can figure it out) but I mean a specification that is a bit easier to get aquainted with :) Thanks PK At 10:30 3/11/2007, you wrote: Well, Connection: close is supposed to cause the server to close the connection after the request has been fulfilled, but it looks like your experience is that TC closes the connection no matter what. What if you use a non-chunked request? You asked already and the response was that TC basically doesn't handle chunked requests. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Keep Alive handling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, Peter Kennard wrote: for HTTP1.1 (in tomcat 6) Does tomcat handle keep alive (ie: keeping a connection open for subsequent requests) If so under what circumstances is the connection closed (or kept open)? Sending chunked content, with a terminal \r\n0\r\n will cause the connection to be disconnected. As does only a termainal \r\n0 What is the 0 for? Are you sending the connection: keep-alive header? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF81Jm9CaO5/Lv0PARAjzxAJ4o4Er8VnA/qe8uOwzwkXfBYHOTIgCghtHu k1uq0TlPyEMa4oXX7clx5Rs= =wIZy -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]
Re: Keep Alive handling
At 19:50 3/10/2007, you wrote: The 0 is the hex digint Zero the terminal EOD chunk is defined in HTTP1.1 as a chunk with a length of 0. This is what terminates the data for the current request. I tried explicitly putting in the keep alive header, though it is deprecated in HTTP1.1 and is the default value if no header is supplied. As expected this has no (different) effect. -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, Peter Kennard wrote: for HTTP1.1 (in tomcat 6) Does tomcat handle keep alive (ie: keeping a connection open for subsequent requests) If so under what circumstances is the connection closed (or kept open)? Sending chunked content, with a terminal \r\n0\r\n will cause the connection to be disconnected. As does only a termainal \r\n0 What is the 0 for? Are you sending the connection: keep-alive header? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF81Jm9CaO5/Lv0PARAjzxAJ4o4Er8VnA/qe8uOwzwkXfBYHOTIgCghtHu k1uq0TlPyEMa4oXX7clx5Rs= =wIZy -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]