From: Bill Stoddard Date: Mon, 31 Dec 2001 21:03:12 +0000 (+0000) Subject: Fix mod_proxy seg fault when the proxied server returns X-Git-Tag: 2.0.30~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfa44902733a10812fdbdc8c936c148561f1e61f;p=thirdparty%2Fapache%2Fhttpd.git Fix mod_proxy seg fault when the proxied server returns an HTTP/0.9 response or a bogus status line. Submitted by: Adam Sussman Reviewed by: Bill Stoddard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92693 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 455ed943b0f..8ac6dc3fcce 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,8 @@ Changes with Apache 2.0.30-dev + *) Fix mod_proxy seg fault when the proxied server returns + an HTTP/0.9 response or a bogus status line. + [Adam Sussman] + *) Prevent mod_proxy from truncating one character off the end of the status line returned from the proxied server. [Adam Sussman, Bill Stoddard] diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index e45021c9b24..81fd0a510a2 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -801,7 +801,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, /* Is it an HTTP/0.9 response? If so, send the extra data */ if (backasswards) { apr_ssize_t cntr = len; - e = apr_bucket_heap_create(buffer, cntr, 0); + e = apr_bucket_heap_create(buffer, cntr, 1); APR_BRIGADE_INSERT_TAIL(bb, e); }