Commit 44e32fe2 authored by Rainer Jung's avatar Rainer Jung
Browse files

mod_reqtimeout: Fix default rates missing (not applied) in 2.4.39.

PR 63325.

Backport of r1857129 + r1857130 from trunk.
Proposed by: ylavic
Backported by: rjung
Reviewed by: ylavic, rpluem, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1859376 13f79535-47bb-0310-9956-ffa450edef68
parent 5d0c8037
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.4.40

  *) mod_reqtimeout: Fix default rates missing (not applied) in 2.4.39.
     PR 63325. [Yann Ylavic]

  *) mod_info: Fix output of server settings for PIPE_BUF in mod_info in
     the rare case that PIPE_BUF is defined. [Rainer Jung]

+0 −6
Original line number Diff line number Diff line
@@ -215,12 +215,6 @@ PATCHES PROPOSED TO BACKPORT FROM TRUNK:
     2.4.x patch: http://people.apache.org/~ylavic/patches/httpd-2.4.x-forward_100_continue-v5.patch
     +1: ylavic, jim

  *) mod_reqtimeout: Fix default rates missing in 2.4.39. PR 63325
     trunk patch: http://svn.apache.org/r1857129
                  http://svn.apache.org/r1857130
     2.4.x patch: svn merge -c 1857129,1857130 ^/httpd/httpd/trunk .
     +1: ylavic, rpluem, jim

  *) mod_status: PR60647: ACC per connection not available w/ event MPM
     trunk patch: http://svn.apache.org/r1780280
     2.4.x patch: svn merge -c 1780280 ^/httpd/httpd/trunk .
+10 −10
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ module AP_MODULE_DECLARE_DATA reqtimeout_module;
#define UNSET                            -1
#define MRT_DEFAULT_handshake_TIMEOUT     0 /* disabled */
#define MRT_DEFAULT_handshake_MAX_TIMEOUT 0
#define MRT_DEFAULT_handshake_MIN_RATE    APR_INT32_MAX
#define MRT_DEFAULT_handshake_MIN_RATE    0
#define MRT_DEFAULT_header_TIMEOUT       20
#define MRT_DEFAULT_header_MAX_TIMEOUT   40
#define MRT_DEFAULT_header_MIN_RATE      500
@@ -220,7 +220,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
    if (block == APR_NONBLOCK_READ || mode == AP_MODE_INIT
        || mode == AP_MODE_EATCRLF) {
        rv = ap_get_brigade(f->next, bb, mode, block, readbytes);
        if (ccfg->cur_stage.rate_factor > 0 && rv == APR_SUCCESS) {
        if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS) {
            extend_timeout(ccfg, bb);
        }
        return rv;
@@ -254,7 +254,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
            }

            if (!APR_BRIGADE_EMPTY(bb)) {
                if (ccfg->cur_stage.rate_factor > 0) {
                if (ccfg->cur_stage.rate_factor) {
                    extend_timeout(ccfg, bb);
                }

@@ -315,7 +315,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
         * the real (relevant) bytes to be asked later, within the
         * currently alloted time.
         */
        if (ccfg->cur_stage.rate_factor > 0 && rv == APR_SUCCESS
        if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS
                && mode != AP_MODE_SPECULATIVE) {
            extend_timeout(ccfg, bb);
        }
@@ -638,17 +638,17 @@ static void reqtimeout_hooks(apr_pool_t *pool)
    ap_hook_post_read_request(reqtimeout_before_body, NULL, NULL,
                              APR_HOOK_MIDDLE);

#if MRT_DEFAULT_HANDSHAKE_MIN_RATE > 0
#if MRT_DEFAULT_handshake_MIN_RATE
    default_handshake_rate_factor = apr_time_from_sec(1) /
                                    MRT_DEFAULT_HANDSHAKE_MIN_RATE;
                                    MRT_DEFAULT_handshake_MIN_RATE;
#endif
#if MRT_DEFAULT_HEADER_MIN_RATE > 0
#if MRT_DEFAULT_header_MIN_RATE
    default_header_rate_factor = apr_time_from_sec(1) /
                                 MRT_DEFAULT_HEADER_MIN_RATE;
                                 MRT_DEFAULT_header_MIN_RATE;
#endif
#if MRT_DEFAULT_BODY_MIN_RATE > 0
#if MRT_DEFAULT_body_MIN_RATE
    default_body_rate_factor = apr_time_from_sec(1) /
                               MRT_DEFAULT_BODY_MIN_RATE;
                               MRT_DEFAULT_body_MIN_RATE;
#endif
}