From 54f22c4dc45ce523be93055402d63ab98f826cf1 Mon Sep 17 00:00:00 2001 From: Nick Kew Date: Thu, 27 Sep 2007 15:21:12 +0000 Subject: [PATCH] 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 --- CHANGES | 4 ++++ modules/proxy/mod_proxy_http.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ef83f51441..8108570063 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 244286be31..829b37f999 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), -- 2.40.0