Author: markt
Date: Thu Feb  7 11:55:36 2013
New Revision: 1443427

URL: http://svn.apache.org/viewvc?rev=1443427&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54456
If the client aborts the request, make sure this is communicated to the 
application reading the request body.

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java?rev=1443427&r1=1443426&r2=1443427&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 
Thu Feb  7 11:55:36 2013
@@ -160,7 +160,10 @@ public class ChunkedInputFilter implemen
         int result = 0;
 
         if (pos >= lastValid) {
-            readBytes();
+            if (readBytes() < 0) {
+                throw new IOException(
+                        "Unexpected end of stream whilst reading request 
body");
+            }
         }
 
         if (remaining > (lastValid - pos)) {
@@ -388,7 +391,7 @@ public class ChunkedInputFilter implemen
      */
     protected void parseEndChunk() throws IOException {
 
-        // Handle option trailer headers
+        // Handle optional trailer headers
         while (parseHeader()) {
             // Loop until we run out of headers
         }



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

Reply via email to