From: Nick Kew Date: Thu, 27 Sep 2007 15:21:12 +0000 (+0000) Subject: Fix adding out Via header in proxy response X-Git-Tag: 2.3.0~1387 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54f22c4dc45ce523be93055402d63ab98f826cf1;p=thirdparty%2Fapache%2Fhttpd.git Fix adding out Via header in proxy response PR 19439 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580060 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index ef83f514414..81085700633 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.3.0 [ When backported to 2.2.x, remove entry from this file ] + *) mod_proxy_http: add Via header correctly (if enabled) to + response, even where other Via headers exist. + PR 19439 [Nick Kew] + *) mod_proxy_http: strip hop-by-hop response headers PR 43455 [Nick Kew] diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 244286be310..829b37f9996 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1388,8 +1388,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, if (server_name == r->hostname) server_name = r->server->server_hostname; /* create a "Via:" response header entry and merge it */ - apr_table_mergen(r->headers_out, "Via", - (conf->viaopt == via_full) + apr_table_addn(r->headers_out, "Via", + (conf->viaopt == via_full) ? apr_psprintf(p, "%d.%d %s%s (%s)", HTTP_VERSION_MAJOR(r->proto_num), HTTP_VERSION_MINOR(r->proto_num),