From: Nick Kew Date: Sat, 8 Sep 2007 20:29:14 +0000 (+0000) Subject: mod_proxy: Don't lose bytes when a response line arrives in small chunks. X-Git-Tag: 2.3.0~1443 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d329cde45532c350276abb33db0072aa9817c61;p=apache mod_proxy: Don't lose bytes when a response line arrives in small chunks. PR 40894 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573903 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 1cf6deb1f0..3eccf04be5 100644 --- 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 ] + *) mod_rewrite: Add option to suppress URL unescaping PR 34602 [Guenther Gsenger ] diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 47889fbadb..6a7e9daef9 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -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;