Author: mturk
Date: Tue Dec 22 07:34:50 2009
New Revision: 893100
URL: http://svn.apache.org/viewvc?rev=893100&view=rev
Log:
Experimental: Try to tighten the protocol packet ordering
Modified:
tomcat/jk/trunk/native/common/jk_ajp_common.c
Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c
URL:
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=893100&r1=893099&r2=893100&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_ajp_common.c (original)
+++ tomcat/jk/trunk/native/common/jk_ajp_common.c Tue Dec 22 07:34:50 2009
@@ -1513,8 +1513,10 @@
/* If this worked, we can break out of the loop
* and proceed with the request.
*/
- if (rc == JK_TRUE)
+ if (rc == JK_TRUE) {
+ ae->last_op = JK_AJP13_FORWARD_REQUEST;
break;
+ }
/* Error during sending the request.
*/
err_send++;
@@ -1594,6 +1596,7 @@
JK_TRACE_EXIT(l);
return JK_FATAL_ERROR;
}
+ ae->last_op = JK_AJP13_FORWARD_REQUEST;
}
else if (JK_IS_DEBUG_LEVEL(l))
jk_log(l, JK_LOG_DEBUG,
@@ -1751,6 +1754,18 @@
JK_TRACE_ENTER(l);
+ if (ae->last_op == JK_AJP13_FORWARD_REQUEST &&
+ code != JK_AJP13_SEND_HEADERS) {
+ /* We have just send a request but received something
+ * that is not response.
+ */
+ if (JK_IS_DEBUG_LEVEL(l)) {
+ jk_log(l, JK_LOG_DEBUG,
+ "Expecting AJP13_SEND HEADERS, received (%d)", code);
+ }
+ JK_TRACE_EXIT(l);
+ return JK_AJP13_ERROR;
+ }
switch (code) {
case JK_AJP13_SEND_HEADERS:
{
@@ -1760,6 +1775,10 @@
/* Do not send anything to the client.
* Backend already send us the headers.
*/
+ if (JK_IS_DEBUG_LEVEL(l)) {
+ jk_log(l, JK_LOG_DEBUG,
+ "Already received AJP13_SEND HEADERS");
+ }
JK_TRACE_EXIT(l);
return JK_AJP13_ERROR;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]