You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/02/21 13:10:58 UTC

svn commit: r1570547 - in /tomcat/trunk: java/org/apache/coyote/ajp/AjpNioProcessor.java webapps/docs/changelog.xml

Author: markt
Date: Fri Feb 21 12:10:57 2014
New Revision: 1570547

URL: http://svn.apache.org/r1570547
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56172
Avoid possible request corruption when using the AJP NIO connector and a request is sent using more than one AJP message.
Patch provided by Amund Elstad.

Modified:
    tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java?rev=1570547&r1=1570546&r2=1570547&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpNioProcessor.java Fri Feb 21 12:10:57 2014
@@ -155,7 +155,7 @@ public class AjpNioProcessor extends Abs
         boolean block = blockFirstRead;
 
         while (read < n) {
-            res = readSocket(buf, read + pos, n, block);
+            res = readSocket(buf, read + pos, n - read, block);
             if (res > 0) {
                 read += res;
             } else if (res == 0 && !block) {

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1570547&r1=1570546&r2=1570547&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Feb 21 12:10:57 2014
@@ -82,6 +82,11 @@
         In some circumstances asynchronous requests could time out too soon.
         (markt)
       </fix>
+      <fix>
+        <bug>56172</bug>: Avoid possible request corruption when using the AJP
+        NIO connector and a request is sent using more than one AJP message.
+        Patch provided by Amund Elstad. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org