]> granicus.if.org Git - apache/commitdiff
Fix adding out Via header in proxy response
authorNick Kew <niq@apache.org>
Thu, 27 Sep 2007 15:21:12 +0000 (15:21 +0000)
committerNick Kew <niq@apache.org>
Thu, 27 Sep 2007 15:21:12 +0000 (15:21 +0000)
PR 19439

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

CHANGES
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index ef83f5144144a7e6f0a170b7fce34b1acb8cd708..810857006331eef4cbb4173650f4f4682f481f4a 100644 (file)
--- 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]
 
index 244286be310b536a8413ce16e69992900efd3534..829b37f9996b01958b3e2a6a696d9e41087d5206 100644 (file)
@@ -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),