Commit 2e2f0be8 authored by Yann Ylavic's avatar Yann Ylavic
Browse files

mod_proxy_http: follow up to r1836588: fix drop of spurious 100 responses.

r1836588 broke t/security/CVE-2008-2364.t by forwarding more than one
"100 continue" response, fix it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1836750 13f79535-47bb-0310-9956-ffa450edef68
parent fe7145fe
Loading
Loading
Loading
Loading
+4 −3
Changes for modules/proxy/mod_proxy_http.c: 4 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -1615,11 +1615,12 @@ int ap_proxy_http_process_response(proxy_http_req_t *req)
            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
                          "HTTP: received interim %d response", r->status);
            if (!policy
                    || !strcasecmp(policy, "RFC")
                    || (proxy_status == HTTP_CONTINUE && req->expecting_100)) {
                    || (!strcasecmp(policy, "RFC")
                        && (proxy_status != HTTP_CONTINUE
                            || (req->expecting_100 = 1)))) {
                if (proxy_status == HTTP_CONTINUE) {
                    r->expecting_100 = req->expecting_100;
                    req->expecting_100 = 0;
                    r->expecting_100 = 1;
                }
                ap_send_interim_response(r, 1);
            }