From: Yann Ylavic Date: Mon, 24 Jan 2022 16:08:14 +0000 (+0000) Subject: mod_reqtimeout: Set socket timeout for AP_MODE_INIT. X-Git-Tag: 2.5.0-alpha2-ci-test-only~545 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4145dfbd86b3446f2bbcde2a87218e6bd8d34a10;p=thirdparty%2Fapache%2Fhttpd.git mod_reqtimeout: Set socket timeout for AP_MODE_INIT. If the SSL handshake is initiated by ssl_hook_process_connection() in AP_MODE_INIT mode, we still want to adapt the socket timeout according to the time left for the handshake. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897422 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/reqtimeout_mode_init.txt b/changes-entries/reqtimeout_mode_init.txt new file mode 100644 index 00000000000..21ac1bb4f2f --- /dev/null +++ b/changes-entries/reqtimeout_mode_init.txt @@ -0,0 +1 @@ + *) mom_reqtimeout: Fix missing handshake= timeout enforcement. [Yann Ylavic] diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index 0ebd78a38e3..0e5afca57e4 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -217,8 +217,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f, if (rv != APR_SUCCESS) goto out; - if (block == APR_NONBLOCK_READ || mode == AP_MODE_INIT - || mode == AP_MODE_EATCRLF) { + if (block == APR_NONBLOCK_READ || mode == AP_MODE_EATCRLF) { rv = ap_get_brigade(f->next, bb, mode, block, readbytes); if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS) { extend_timeout(ccfg, bb);