From: Ian Holsman Date: Thu, 29 Nov 2001 21:09:31 +0000 (+0000) Subject: r->headers_in is shared by original requests and components (make no sense X-Git-Tag: 2.0.30~331 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6084f225f47da00120e50adecd843bba79bb4217;p=apache r->headers_in is shared by original requests and components (make no sense 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92253 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index adb13c6dbd..0a2880b0bf 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -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)))