From: Yann Ylavic Date: Mon, 11 May 2015 09:07:56 +0000 (+0000) Subject: Merge r1621453 from trunk. X-Git-Tag: 2.2.30~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=381066fae8e372125370ab0de7157413b41bf046;p=thirdparty%2Fapache%2Fhttpd.git Merge r1621453 from trunk. PR56729: mod_reqtimeout gets confused when it sees a read via check_pipeline() just before a slow HTTP response completes. Committed By: coverner Reviewed By: covener, trawick, ylavic Backported By: ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1678698 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 2f5c4981cc6..fbce6c34cb4 100644 --- a/STATUS +++ b/STATUS @@ -101,13 +101,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_reqtimeout: PR56729: mod_reqtimeout gets confused when it sees a read - via check_pipeline() just before a slow HTTP response completes. - trunk patch: http://svn.apache.org/viewvc?view=revision&revision=r1621453 - 2.2.x patch: http://people.apache.org/~covener/patches/httpd-2.2.2-reqtimeout-slow-post.diff - (minor merge conflict) - +1 covener, trawick, ylavic - * mod_deflate: Define APR_INT32_MAX when it is missing so to be able to compile against APR-1.2.x (minimum required version). trunk/2.4.x patch: not concerned (require APR-1.5.x) diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index bc04e684176..dc8cd734e39 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -171,7 +171,18 @@ 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); + } + now = apr_time_now(); + if (ccfg->new_timeout > 0) { /* set new timeout */ ccfg->timeout_at = now + apr_time_from_sec(ccfg->new_timeout);