From: remm Date: Mon, 28 Aug 2006 09:26:51 +0000 (+0000) Subject: - Adjust content length fix so that it does the same as for the HTTP connector. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=af0241e8f99427f8db519ce5abead2c893cf39f0;p=tomcat7.0 - Adjust content length fix so that it does the same as for the HTTP connector. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@437620 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/ajp/AjpAprProcessor.java b/java/org/apache/coyote/ajp/AjpAprProcessor.java index 41d948b03..2a978d64d 100644 --- a/java/org/apache/coyote/ajp/AjpAprProcessor.java +++ b/java/org/apache/coyote/ajp/AjpAprProcessor.java @@ -571,9 +571,9 @@ 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()); + request.setContentLength(bc.getLength()); first = false; empty = false; replay = true; diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java b/java/org/apache/coyote/ajp/AjpProcessor.java index faf8507b9..6e09d0fd1 100644 --- a/java/org/apache/coyote/ajp/AjpProcessor.java +++ b/java/org/apache/coyote/ajp/AjpProcessor.java @@ -543,6 +543,7 @@ public class AjpProcessor implements ActionHook { // Set the given bytes as the content ByteChunk bc = (ByteChunk) param; bodyBytes.setBytes(bc.getBytes(), bc.getStart(), bc.getLength()); + request.setContentLength(bc.getLength()); first = false; empty = false; replay = true; diff --git a/java/org/apache/jk/core/MsgContext.java b/java/org/apache/jk/core/MsgContext.java index e9d10d96d..da2eaaeb8 100644 --- a/java/org/apache/jk/core/MsgContext.java +++ b/java/org/apache/jk/core/MsgContext.java @@ -351,8 +351,8 @@ 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; + req.setContentLength(bc.getLength()); jkIS.setReplay(bc); } }