summaryrefslogtreecommitdiffstats
path: root/modules/filters
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2014-11-24 12:42:16 +0100
committerYann Ylavic <ylavic@apache.org>2014-11-24 12:42:16 +0100
commiteae7562ac1c63e65dd370ea33b1b52e8f1cf74e2 (patch)
tree76b9780370d3263c0f9d0d4aca58cee739984d29 /modules/filters
parentsurprising but confirmed by comment in mod_proxy (diff)
downloadapache2-eae7562ac1c63e65dd370ea33b1b52e8f1cf74e2.tar.xz
apache2-eae7562ac1c63e65dd370ea33b1b52e8f1cf74e2.zip
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
Diffstat (limited to 'modules/filters')
-rw-r--r--modules/filters/mod_reqtimeout.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c
index 52b4c42ab8..f4b38e22a4 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);
}
}