From df09bfe3f6bb35b6aeb8a70c13f2f17854c286bd Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Mon, 13 Feb 2006 22:58:03 +0000 Subject: [PATCH] * Use the correct pool for apr_table_copy. Otherwise we trigger the bad pool ancestry abort in apr_table_copy if apr is compiled with APR_POOL_DEBUG. Noticed by: Joe Orton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@377525 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_http.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 7a5b4a3870..f1bb31d435 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -725,8 +725,14 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, * Make a copy of the headers_in table before clearing the connection * headers as we need the connection headers later in the http output * filter to prepare the correct response headers. + * + * Note: We need to take r->pool for apr_table_copy as the key / value + * pairs in r->headers_in have been created out of r->pool and + * p might be (and actually is) a longer living pool. + * This would trigger the bad pool ancestry abort in apr_table_copy if + * apr is compiled with APR_POOL_DEBUG. */ - headers_in_copy = apr_table_copy(p, r->headers_in); + headers_in_copy = apr_table_copy(r->pool, r->headers_in); ap_proxy_clear_connection(p, headers_in_copy); /* send request headers */ headers_in_array = apr_table_elts(headers_in_copy); -- 2.40.0