From 8284fdfaa58719a3c12a9a80168222f78c601502 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Mon, 24 Nov 2014 11:42:16 +0000 Subject: [PATCH] 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 --- modules/filters/mod_reqtimeout.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } } -- 2.47.3