Commit 2f7267a4 authored by Yann Ylavic's avatar Yann Ylavic
Browse files

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
parent 1bd727e4
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -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)
+11 −0
Original line number Diff line number Diff line
@@ -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);