From f41887018a27625a1fe21c3c1ac200dab576515e Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Sat, 30 Aug 2014 12:59:44 +0000 Subject: [PATCH] PR56729: mod_reqtimeout gets confused when it sees a read via 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index b19d951250..52b4c42ab8 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -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(); -- 2.40.0