]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1621453 from trunk.
authorYann Ylavic <ylavic@apache.org>
Mon, 11 May 2015 09:07:56 +0000 (09:07 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 11 May 2015 09:07:56 +0000 (09:07 +0000)
PR56729: mod_reqtimeout gets confused when it sees a read via
check_pipeline() just before a slow HTTP response completes.

Committed By: coverner
Reviewed By: covener, trawick, ylavic
Backported By: ylavic

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

STATUS
modules/filters/mod_reqtimeout.c

diff --git a/STATUS b/STATUS
index 2f5c4981cc671554c7821d1ef53f7f6bea42178a..fbce6c34cb4900188af45316f22e73dc4b25fe51 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -101,13 +101,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_reqtimeout: PR56729: mod_reqtimeout gets confused when it sees a read 
-     via check_pipeline() just before a slow HTTP response completes.
-     trunk patch: http://svn.apache.org/viewvc?view=revision&revision=r1621453
-     2.2.x patch: http://people.apache.org/~covener/patches/httpd-2.2.2-reqtimeout-slow-post.diff
-                  (minor merge conflict)
-     +1 covener, trawick, ylavic
-
    * mod_deflate: Define APR_INT32_MAX when it is missing so to be able to
                   compile against APR-1.2.x (minimum required version).
      trunk/2.4.x patch: not concerned (require APR-1.5.x)
index bc04e684176d3ea38a99040815fa0191efddbaac..dc8cd734e3913b31bf835d0de1357ad5516042cb 100644 (file)
@@ -171,7 +171,18 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
         return ap_get_brigade(f->next, bb, mode, block, readbytes);
     }
 
+    if (block == APR_NONBLOCK_READ && mode == AP_MODE_SPECULATIVE) { 
+        /*  The source of these above us in the core is check_pipeline(), which
+         *  is between requests but before this filter knows to reset timeouts 
+         *  during log_transaction().  If they appear elsewhere, just don't 
+         *  check or extend the time since they won't block and we'll see the
+         *  bytes again later
+         */
+        return ap_get_brigade(f->next, bb, mode, block, readbytes);
+    }
+
     now = apr_time_now();
+
     if (ccfg->new_timeout > 0) {
         /* set new timeout */
         ccfg->timeout_at = now + apr_time_from_sec(ccfg->new_timeout);