]> granicus.if.org Git - apache/commitdiff
r->headers_in is shared by original requests and components (make no sense
authorIan Holsman <ianh@apache.org>
Thu, 29 Nov 2001 21:09:31 +0000 (21:09 +0000)
committerIan Holsman <ianh@apache.org>
Thu, 29 Nov 2001 21:09:31 +0000 (21:09 +0000)
copy them for components), but each component has its own r->pool.
So once the first component set "Max-Forwards", it is in headers_in
but the value could get lost with the first component's r->pool.
Hence I sometimes see "Max-Forwards" has value like letter "l".
Change it to use apr_table_set() fixed the problem.

Submitted by: Jin Hong <jinh@cnet.com>

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

modules/proxy/mod_proxy.c

index adb13c6dbd40ade3fb46116eed879987ac0238ee..0a2880b0bf27670993d9a901a1fab12b991fc8e3 100644 (file)
@@ -382,7 +382,7 @@ static int proxy_handler(request_rec *r)
        /* set configured max-forwards */
        maxfwd = conf->maxfwd;
     }
-    apr_table_setn(r->headers_in, "Max-Forwards", 
+    apr_table_set(r->headers_in, "Max-Forwards", 
                   apr_psprintf(r->pool, "%ld", (maxfwd > 0) ? maxfwd : 0));
 
     if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))