]> granicus.if.org Git - apache/commitdiff
mod_proxy: Don't lose bytes when a response line arrives in small chunks.
authorNick Kew <niq@apache.org>
Sat, 8 Sep 2007 20:29:14 +0000 (20:29 +0000)
committerNick Kew <niq@apache.org>
Sat, 8 Sep 2007 20:29:14 +0000 (20:29 +0000)
PR 40894

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573903 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 1cf6deb1f038df87596fe1343893b2a593e20c43..3eccf04be511dffecb12cdda99ea63eb388c06ac 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) mod_proxy: Don't lose bytes when a response line arrives in small chunks.
+     PR 40894 [Andrew Rucker Jones <arjones simultan.dyndns.org>]
+
   *) mod_rewrite: Add option to suppress URL unescaping
      PR 34602 [Guenther Gsenger <guenther.gsenger gmail.com>]
 
index 47889fbadb5e602b827792538347d286cdd3909a..6a7e9daef91b32bab28f6f0a5560f2851a55f198 100644 (file)
@@ -994,12 +994,14 @@ PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade
                     len = (bufflen-1)-(pos-buff);
                 }
                 if (len > 0) {
-                    pos = apr_cpystrn(pos, response, len);
+                    memcpy(pos, response, len);
+                    pos += len;
                 }
             }
             APR_BUCKET_REMOVE(e);
             apr_bucket_destroy(e);
         }
+        *pos = '\0';
     }
 
     return APR_SUCCESS;