Commit d8749308 authored by William A. Rowe Jr's avatar William A. Rowe Jr
Browse files

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
parent 2313f93a
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -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);
        }
    }