From bfa44902733a10812fdbdc8c936c148561f1e61f Mon Sep 17 00:00:00 2001 From: Bill Stoddard Date: Mon, 31 Dec 2001 21:03:12 +0000 Subject: [PATCH] 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 --- CHANGES | 4 ++++ modules/proxy/proxy_http.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 455ed943b0..8ac6dc3fcc 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 e45021c9b2..81fd0a510a 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); } -- 2.40.0