Author: rpluem
Date: Mon Feb 13 14:58:03 2006
New Revision: 377525
URL: http://svn.apache.org/viewcvs?rev=377525&view=rev
Log:
* 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
Modified:
httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=377525&r1=377524&r2=377525&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Mon Feb 13 14:58:03 2006
@@ -725,8 +725,14 @@
* 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);
|