You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2014/04/10 14:37:18 UTC

svn commit: r1586282 - /tomcat/jk/trunk/native/common/jk_ajp_common.c

Author: rjung
Date: Thu Apr 10 12:37:18 2014
New Revision: 1586282

URL: http://svn.apache.org/r1586282
Log:
Followup for r1586044 (broken request chunking).

Modified:
    tomcat/jk/trunk/native/common/jk_ajp_common.c

Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=1586282&r1=1586281&r2=1586282&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_ajp_common.c (original)
+++ tomcat/jk/trunk/native/common/jk_ajp_common.c Thu Apr 10 12:37:18 2014
@@ -1479,11 +1479,15 @@ static int ajp_read_into_msg_buff(ajp_en
 
     /* Pick the max size since we don't know the content_length
      */
-    if ((r->is_chunked && len == 0) || len < 0 || len > maxlen) {
+    if (r->is_chunked && ae->left_bytes_to_send == 0) {
         len = maxlen;
-    }
-    if (ae->left_bytes_to_send > 0 && (jk_uint64_t)len > ae->left_bytes_to_send) {
-        len = (int)ae->left_bytes_to_send;
+    } else {
+        if ((jk_uint64_t)maxlen > ae->left_bytes_to_send) {
+            maxlen = (int)ae->left_bytes_to_send;
+        }
+        if (len < 0 || len > maxlen) {
+            len = maxlen;
+        }
     }
 
     if ((len = ajp_read_fully_from_server(r, l, read_buf, len)) < 0) {



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