Author: billbarker
Date: Sat Dec 31 16:24:57 2005
New Revision: 360466
URL: http://svn.apache.org/viewcvs?rev=360466&view=rev
Log:
Fix handling of the special first Body-Chunk packet.
Somebody that knows the APR interface better than me could probably clean this
up (e.g. swallow an unread first Body-Chunk in recycle instead of in process).
However, it probably doesn't actually make much difference in terms of
processing speed.
I haven't actually tested this, but now it's doing much the same thing as the
JK/Java Connector, so it should be fine.
Modified:
tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
Modified:
tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL:
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=360466&r1=360465&r2=360466&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
(original)
+++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
Sat Dec 31 16:24:57 2005
@@ -385,6 +385,12 @@
error = true;
}
continue;
+ } else if(type != Constants.JK_AJP13_FORWARD_REQUEST) {
+ // Usually the servlet didn't read the previous request
body
+ if(log.isDebugEnabled()) {
+ log.debug("Unexpected message: "+type);
+ }
+ continue;
}
keptAlive = true;
@@ -1191,7 +1197,7 @@
if (endOfStream) {
return -1;
}
- if (first) {
+ if (first && req.getContentLength() > 0) {
// Handle special first-body-chunk
if (!receive()) {
return 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]