From: William A. Rowe Jr Date: Fri, 18 Nov 2016 14:45:32 +0000 (+0000) Subject: Backport: r1769965 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4958104f465e3f308977da44d370dd625b709da4;p=thirdparty%2Fapache%2Fhttpd.git Backport: r1769965 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 --- diff --git a/server/vhost.c b/server/vhost.c index ebf1a995aa8..18965956535 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -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); } }