From: <jbo...@li...> - 2006-01-03 10:33:12
|
Author: rem...@jb... Date: 2006-01-03 05:33:04 -0500 (Tue, 03 Jan 2006) New Revision: 1973 Modified: trunk/labs/jbossweb/src/share/classes/org/apache/coyote/ajp/AjpAprProcessor.java Log: - Port patch for not blocking for non available content. Modified: trunk/labs/jbossweb/src/share/classes/org/apache/coyote/ajp/AjpAprProcessor.java =================================================================== --- trunk/labs/jbossweb/src/share/classes/org/apache/coyote/ajp/AjpAprProcessor.java 2006-01-02 06:52:24 UTC (rev 1972) +++ trunk/labs/jbossweb/src/share/classes/org/apache/coyote/ajp/AjpAprProcessor.java 2006-01-03 10:33:04 UTC (rev 1973) @@ -32,6 +32,7 @@ import org.apache.coyote.Request; import org.apache.coyote.RequestInfo; import org.apache.coyote.Response; +import org.apache.jk.common.AjpConstants; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.jni.Status; import org.apache.tomcat.util.buf.ByteChunk; @@ -384,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; @@ -766,7 +773,7 @@ requestHeaderMessage.getBytes(request.method()); break; - case Constants.SC_A_SECRET: + case AjpConstants.SC_A_SECRET: requestHeaderMessage.getBytes(tmpMB); if (requiredSecret != null) { secret = true; @@ -1190,7 +1197,7 @@ if (endOfStream) { return -1; } - if (first) { + if (first && req.getContentLength() > 0) { // Handle special first-body-chunk if (!receive()) { return 0; |