]> granicus.if.org Git - apache/commitdiff
mod_proxy: Ensure we don't attempt to amend a table we are iterating
authorGraham Leggett <minfrin@apache.org>
Mon, 13 May 2013 14:45:49 +0000 (14:45 +0000)
committerGraham Leggett <minfrin@apache.org>
Mon, 13 May 2013 14:45:49 +0000 (14:45 +0000)
through, ensuring that all headers listed by Connection are removed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1481891 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index fecbdf77258b90074cdd25de48af5f940480a1b9..c664391e190a81fe07d1d12524635dd39e684d1a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_proxy: Ensure we don't attempt to amend a table we are iterating
+     through, ensuring that all headers listed by Connection are removed.
+     [Graham Leggett, Co-Advisor <coad measurement-factory.com>]
+
   *) core: apachectl -S prints wildcard name-based virtual hosts twice. 
      PR54948 [Eric Covener]
 
index f0222fe08fb9f0d41816d7948a10c250bc9186a5..d9e9e430ce721788327b79584119ceac53bd7c47 100644 (file)
@@ -3000,13 +3000,13 @@ static int clear_conn_headers(void *data, const char *key, const char *val)
     return 1;
 }
 
-static void proxy_clear_connection(apr_pool_t *p, apr_table_t *headers)
+static void proxy_clear_connection(request_rec *r, apr_table_t *headers)
 {
     header_dptr x;
-    x.pool = p;
+    x.pool = r->pool;
     x.table = headers;
     apr_table_unset(headers, "Proxy-Connection");
-    apr_table_do(clear_conn_headers, &x, headers, "Connection", NULL);
+    apr_table_do(clear_conn_headers, &x, r->headers_in, "Connection", NULL);
     apr_table_unset(headers, "Connection");
 }
 
@@ -3194,7 +3194,7 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
      * apr is compiled with APR_POOL_DEBUG.
      */
     headers_in_copy = apr_table_copy(r->pool, r->headers_in);
-    proxy_clear_connection(p, headers_in_copy);
+    proxy_clear_connection(r, headers_in_copy);
     /* send request headers */
     headers_in_array = apr_table_elts(headers_in_copy);
     headers_in = (const apr_table_entry_t *) headers_in_array->elts;