Author: mturk Date: Tue Oct 7 09:44:44 2008 New Revision: 702540 URL: http://svn.apache.org/viewvc?rev=702540&view=rev Log: Send an empty initial POST message if client failed in a middle of request
Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?rev=702540&r1=702539&r2=702540&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Tue Oct 7 09:44:44 2008 @@ -1588,6 +1588,14 @@ if ((len = ajp_read_into_msg_buff(ae, s, op->post, len, l)) < 0) { /* the browser stop sending data, no need to recover */ op->recoverable = JK_FALSE; + /* Send an empty POST message since per AJP protocol + * spec whenever we have content lenght the message + * packet must be followed with initial POST packet. + * Size zero will be handled as error in container. + */ + jk_b_reset(op->post); + jk_b_append_int(op->post, 0); + ajp_connection_tcp_send_message(ae, op->post, l); JK_TRACE_EXIT(l); return JK_CLIENT_RD_ERROR; } Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=702540&r1=702539&r2=702540&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Oct 7 09:44:44 2008 @@ -43,6 +43,12 @@ <br /> <subsection name="Native"> <changelog> + <fix>Always send initial POST packet even if the client + disconnected after sending request but before providing + POST data. In that case or in case the client broke the + connection in a middle of read send an zero size packet + informing container about broken client connection. (mturk) + </fix> <update> Added connection_acquire_timeout directive for setting the absolute timeout the worker will wait for a free endpoint. (mturk) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]