diff options
author | Yann Ylavic <ylavic@apache.org> | 2019-02-20 08:54:51 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2019-02-20 08:54:51 +0000 |
commit | 33bba0cb967cc39b9c0cdff9cdfdd79bed9f2f15 (patch) | |
tree | 7fffa1c766572cffe8b11380fd1ded4c12c91b6e /modules/filters | |
parent | 5160a03ef8c9179402820084154f736036c8831a (diff) | |
download | httpd-33bba0cb967cc39b9c0cdff9cdfdd79bed9f2f15.tar.gz |
mod_reqtimeout: follow up to r1853901: init stage name outside INIT_STAGE().
It helps both code readability where stages are initilized and potential
logging in the input filter (even if the stage is disabled).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1853935 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/filters')
-rw-r--r-- | modules/filters/mod_reqtimeout.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index e6e93e65d1..ce8950b87d 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -365,7 +365,6 @@ static apr_status_t reqtimeout_eor(ap_filter_t *f, apr_bucket_brigade *bb) ccfg->cur_stage.max_timeout = MRT_DEFAULT_##stage##_MAX_TIMEOUT; \ ccfg->cur_stage.rate_factor = default_##stage##_rate_factor; \ } \ - ccfg->type = #stage; \ } while (0) static int reqtimeout_init(conn_rec *c) @@ -392,6 +391,7 @@ static int reqtimeout_init(conn_rec *c) ap_add_output_filter(reqtimeout_filter_name, ccfg, NULL, c); ap_add_input_filter(reqtimeout_filter_name, ccfg, NULL, c); + ccfg->type = "handshake"; if (cfg->handshake.timeout > 0) { INIT_STAGE(cfg, ccfg, handshake); } @@ -419,6 +419,7 @@ static void reqtimeout_before_header(request_rec *r, conn_rec *c) /* (Re)set the state for this new request, but ccfg->socket and * ccfg->tmpbb which have the lifetime of the connection. */ + ccfg->type = "header"; ccfg->timeout_at = 0; ccfg->max_timeout_at = 0; ccfg->in_keep_alive = (c->keepalives > 0); @@ -439,9 +440,9 @@ static int reqtimeout_before_body(request_rec *r) &reqtimeout_module); AP_DEBUG_ASSERT(cfg != NULL); + ccfg->type = "body"; ccfg->timeout_at = 0; ccfg->max_timeout_at = 0; - ccfg->type = "body"; if (r->method_number == M_CONNECT) { /* disabled for a CONNECT request */ ccfg->cur_stage.timeout = 0; |