From: Yann Ylavic Date: Thu, 26 Jul 2018 17:51:09 +0000 (+0000) Subject: mod_proxy_http: follow up to r1836588: fix drop of spurious 100 responses. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6fcec7974993fdae6ee442416cad2f1014ba3b9;p=apache 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 --- diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index f98ba668bb..941e2325ae 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -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); }