Porting fix for BZ #40306
authorbillbarker <billbarker@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 28 Aug 2006 04:49:31 +0000 (04:49 +0000)
committerbillbarker <billbarker@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 28 Aug 2006 04:49:31 +0000 (04:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@437530 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ajp/AjpAprProcessor.java
java/org/apache/jk/core/MsgContext.java

index c94dde2..41d948b 100644 (file)
@@ -571,6 +571,7 @@ public class AjpAprProcessor implements ActionHook {
         } else if (actionCode == ActionCode.ACTION_REQ_SET_BODY_REPLAY) {
 
             // Set the given bytes as the content
+            request.setContentLength(-1); // reset content length
             ByteChunk bc = (ByteChunk) param;
             bodyBytes.setBytes(bc.getBytes(), bc.getStart(), bc.getLength());
             first = false;
index 10963ce..e9d10d9 100644 (file)
@@ -351,6 +351,7 @@ public class MsgContext implements ActionHook {
         } else if ( actionCode == ActionCode.ACTION_REQ_SET_BODY_REPLAY ) {
             if( log.isTraceEnabled() )
                 log.trace("Replay ");
+            req.setContentLength(-1); // reset content length
             ByteChunk bc = (ByteChunk)param;
             jkIS.setReplay(bc);
         }