]> granicus.if.org Git - apache/commitdiff
PR56729: mod_reqtimeout gets confused when it sees a read via
authorEric Covener <covener@apache.org>
Sat, 30 Aug 2014 12:59:44 +0000 (12:59 +0000)
committerEric Covener <covener@apache.org>
Sat, 30 Aug 2014 12:59:44 +0000 (12:59 +0000)
check_pipeline() just before a slow HTTP response completes.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621453 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_reqtimeout.c

index b19d9512503902ba859465b3093cfa76a4454c4d..52b4c42ab80f1aea53c611b04782290566aab5c3 100644 (file)
@@ -183,6 +183,16 @@ 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);
+    }
+
     if (ccfg->new_timeout > 0) {
         /* set new timeout */
         now = apr_time_now();