From: Yann Ylavic Date: Mon, 24 Nov 2014 11:42:16 +0000 (+0000) Subject: mod_reqtimeout: don't extend the timeout in speculative mode, wait for the X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8284fdfaa58719a3c12a9a80168222f78c601502;p=thirdparty%2Fapache%2Fhttpd.git mod_reqtimeout: don't extend the timeout in speculative mode, wait for the 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 --- diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index 52b4c42ab80..f4b38e22a49 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -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); } }