]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport: r1769965
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 18 Nov 2016 14:45:32 +0000 (14:45 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 18 Nov 2016 14:45:32 +0000 (14:45 +0000)
Submitted by: wrowe, rpluem

Actually cause the Host header to be overridden, as noted by rpluem,
and simplify now that there isn't a log-only mode.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x-merge-http-strict@1770386 13f79535-47bb-0310-9956-ffa450edef68

server/vhost.c

index ebf1a995aa84789abf3e587439290a71d457bcc8..1896595653598a2dba758c54df86717f02854527 100644 (file)
@@ -1165,13 +1165,11 @@ AP_DECLARE(void) ap_update_vhost_from_headers(request_rec *r)
          * request line.
          */
         if (have_hostname_from_url && host_header != NULL) {
-            const char *info = "Would replace";
-            const char *new = construct_host_header(r, is_v6literal);
-            apr_table_set(r->headers_in, "Host", r->hostname);
-            info = "Replacing";
+            const char *repl = construct_host_header(r, is_v6literal);
+            apr_table_set(r->headers_in, "Host", repl);
             ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02417)
-                          "%s Host header '%s' with host from request uri: "
-                          "'%s'", info, host_header, new);
+                          "Replacing host header '%s' with host '%s' given "
+                          "in the request uri", host_header, repl);
         }
     }