]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_reqtimeout: don't extend the timeout in speculative mode, wait for the
authorYann Ylavic <ylavic@apache.org>
Mon, 24 Nov 2014 11:42:16 +0000 (11:42 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 24 Nov 2014 11:42:16 +0000 (11:42 +0000)
real (relevant) bytes to be asked later, within the currently alloted time.
This applies to blocking reads only since r1621453 already bypassed the
filter for nonblocking ones.

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

modules/filters/mod_reqtimeout.c

index 52b4c42ab80f1aea53c611b04782290566aab5c3..f4b38e22a490ac9dd3c5b54284a0175e2907a8ee 100644 (file)
@@ -311,7 +311,12 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
     else {
         /* mode != AP_MODE_GETLINE */
         rv = ap_get_brigade(f->next, bb, mode, block, readbytes);
-        if (ccfg->min_rate > 0 && rv == APR_SUCCESS) {
+        /* Don't extend the timeout in speculative mode, wait for
+         * the real (relevant) bytes to be asked later, within the
+         * currently alloted time.
+         */
+        if (ccfg->min_rate > 0 && rv == APR_SUCCESS
+                && mode != AP_MODE_SPECULATIVE) {
             extend_timeout(ccfg, bb);
         }
     }