]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1759984, r1760018 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 10 Oct 2016 12:24:47 +0000 (12:24 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 10 Oct 2016 12:24:47 +0000 (12:24 +0000)
mod_proxy_fcgi: handle the HTTP 412 use case

This is a follow up of http://svn.apache.org/r1752347;
ap_meet_conditions could return a 412 status that if not
handled causes subsequent bogus reads and wrong messages
logged (like AH01070). After a chat on dev@ the feedback
was to couple HTTP_NOT_MODIFIED with HTTP_PRECONDITION_FAILED,
but any other feedback is welcome.

Fix stupid mistake introduced in r1759984
Submitted by: elukey
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1764075 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/proxy/mod_proxy_fcgi.c

diff --git a/STATUS b/STATUS
index 61c962a3fef43e85edf2cc1491adedb859654b71..ac3182e8b355920a6f64b504f8d7e6041e4002bd 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -117,14 +117,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_proxy_fcgi: read the whole FCGI response even for HTTP Precondition
-     failed (412) responses to avoid subsequent bogus reads and
-     confusing error messages logged.
-     trunk patch: http://svn.apache.org/r1759984
-                  http://svn.apache.org/r1760018
-     2.4.x patch: trunk works
-     +1 elukey, jim, ylavic
-
   *) mod_proxy: add log trace points to help users diagnose problems with
      ProxyPass[Match].
      trunk patch: http://svn.apache.org/r1762517
index 943e04dc4598a2e58f8d81e6f4c05574e21e6623..a11757c5a726ef07b42f6026bd28f0a03d843256 100644 (file)
@@ -660,13 +660,17 @@ recv_again:
                                     *err = "passing headers brigade to output filters";
                                     break;
                                 }
-                                else if (status == HTTP_NOT_MODIFIED) {
-                                    /* The 304 response MUST NOT contain
-                                     * a message-body, ignore it.
+                                else if (status == HTTP_NOT_MODIFIED
+                                         || status == HTTP_PRECONDITION_FAILED) {
+                                    /* Special 'status' cases handled:
+                                     * 1) HTTP 304 response MUST NOT contain
+                                     *    a message-body, ignore it.
+                                     * 2) HTTP 412 response.
                                      * The break is not added since there might
                                      * be more bytes to read from the FCGI
                                      * connection. Even if the message-body is
-                                     * ignored we want to avoid subsequent
+                                     * ignored (and the EOS bucket has already
+                                     * been sent) we want to avoid subsequent
                                      * bogus reads. */
                                     ignore_body = 1;
                                 }