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

  Now backport whitespace-only changes from r209836, making the rest of
  the patches more legible, and the resulting code comparable   to httpd/trunk/modules/proxy/mod_proxy_http.c.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody-2.0.x@230706 13f79535-47bb-0310-9956-ffa450edef68
parent 445685ec
Loading
Loading
Loading
Loading
+99 −106
Original line number Diff line number Diff line
@@ -1010,14 +1010,15 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
    headers_in_array = apr_table_elts(r->headers_in);
    headers_in = (const apr_table_entry_t *) headers_in_array->elts;
    for (counter = 0; counter < headers_in_array->nelts; counter++) {
        if (headers_in[counter].key == NULL || headers_in[counter].val == NULL
        if (headers_in[counter].key == NULL 
             || headers_in[counter].val == NULL

        /* Clear out hop-by-hop request headers not to send
         * RFC2616 13.5.1 says we should strip these headers
         */
            /* Already sent */
             || !apr_strnatcasecmp(headers_in[counter].key, "Host")

            /* Clear out hop-by-hop request headers not to send
             * RFC2616 13.5.1 says we should strip these headers
             */
             || !apr_strnatcasecmp(headers_in[counter].key, "Keep-Alive")
             || !apr_strnatcasecmp(headers_in[counter].key, "TE")
             || !apr_strnatcasecmp(headers_in[counter].key, "Trailer")
@@ -1071,7 +1072,6 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
            }
        }


        buf = apr_pstrcat(p, headers_in[counter].key, ": ",
                          headers_in[counter].val, CRLF,
                          NULL);
@@ -1178,7 +1178,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
            }
            r->status_line = apr_pstrdup(p, &buffer[9]);
            

            /* read the headers. */
            /* N.B. for HTTP/1.0 clients, we have to fold line-wrapped headers*/
            /* Also, take care with headers with multiple occurences. */
@@ -1200,8 +1199,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                r->status = HTTP_BAD_GATEWAY;
                r->status_line = "bad gateway";
                return r->status;

            } else {
            }

            /* can't have both Content-Length and Transfer-Encoding */
            if (apr_table_get(r->headers_out, "Transfer-Encoding")
@@ -1227,7 +1225,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                ap_set_content_type(r, apr_pstrdup(p, buf));
            }            
            ap_proxy_pre_http_request(origin,rp);
            }

            /* handle Via header in response */
            if (conf->viaopt != via_off && conf->viaopt != via_block) {
@@ -1269,7 +1266,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
        }

        /* we must accept 3 kinds of date, but generate only 1 kind of date */
        {
        if ((buf = apr_table_get(r->headers_out, "Date")) != NULL) {
            apr_table_set(r->headers_out, "Date",
                          ap_proxy_date_canon(p, buf));
@@ -1282,12 +1278,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
            apr_table_set(r->headers_out, "Last-Modified",
                          ap_proxy_date_canon(p, buf));
        }
        }

        /* munge the Location and URI response headers according to
         * ProxyPassReverse
         */
        {
        if ((buf = apr_table_get(r->headers_out, "Location")) != NULL) {
            apr_table_set(r->headers_out, "Location",
                          ap_proxy_location_reverse_map(r, conf, buf));
@@ -1300,7 +1294,6 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
            apr_table_set(r->headers_out, "URI",
                          ap_proxy_location_reverse_map(r, conf, buf));
        }
        }

        if ((r->status == 401) && (conf->error_override != 0)) {
            const char *wa = "WWW-Authenticate";