View | Details | Raw Unified | Return to bug 56718
Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +26 lines)
Line  Link Here
0
-- httpd-2.4.12/server/protocol.c.orig    2014-11-29 04:22:43.000000000 -0500
0
++ httpd-2.4.12/server/protocol.c      2015-02-10 21:47:56.000000000 -0500
Lines 1047-1052 Link Here
1047
             */
1047
             */
1048
            apr_table_unset(r->headers_in, "Content-Length");
1048
            apr_table_unset(r->headers_in, "Content-Length");
1049
        }
1049
        }
1050
1051
        /*
1052
         * If a request-target in the absolute-form was sent in the request
1053
         * message, r->parsed_uri.hostname should already be set. We need to
1054
         * make sure the Host: header matches the authoriy component of the
1055
         * request-target
1056
         *
1057
         * The common case (Relative URI) will skip past this function. Only
1058
         * fix the Host: header if it was already present in the request as
1059
         * server needs to send an error 400 if it is missing (Dealt withi
1060
         * further down)
1061
         */
1062
        if (r->parsed_uri.hostname && apr_table_get(r->headers_in, "Host")) {
1063
            char *hostname;
1064
1065
            /* Check if port was part of the request-target */
1066
            if (r->parsed_uri.port_str){
1067
                hostname = apr_pstrcat(r->pool, r->parsed_uri.hostname, ":", r->parsed_uri.port_str, NULL);
1068
            } else {
1069
                hostname = r->parsed_uri.hostname;
1070
            }
1071
1072
            apr_table_set(r->headers_in, "Host", hostname);
1073
        }
1074
1050
    }
1075
    }
1051
    else {
1076
    else {
1052
        if (r->header_only) {
1077
        if (r->header_only) {

Return to bug 56718