From 94d9347fcaa0566c438fd2d4dc263cd693475dbb Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Tue, 19 Feb 2019 18:22:11 +0000 Subject: [PATCH] mod_reqtimeout: follow up to r1853906: adjust hooks priorities comments. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1853908 13f79535-47bb-0310-9956-ffa450edef68 --- modules/filters/mod_reqtimeout.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index a29091c576..80aa7db4f5 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -607,8 +607,7 @@ static void reqtimeout_hooks(apr_pool_t *pool) { /* * mod_ssl is AP_FTYPE_CONNECTION + 5 and mod_reqtimeout needs to - * be called before mod_ssl. Otherwise repeated reads during the ssl - * handshake can prevent the timeout from triggering. + * be called before mod_ssl for the handshake stage to catch SSL traffic. */ ap_register_input_filter(reqtimeout_filter_name, reqtimeout_filter, NULL, AP_FTYPE_CONNECTION + 8); @@ -625,8 +624,11 @@ static void reqtimeout_hooks(apr_pool_t *pool) * mod_reqtimeout needs to be called before ap_process_http_request (which * is run at APR_HOOK_REALLY_LAST) but after all other protocol modules. * This ensures that it only influences normal http connections and not - * e.g. mod_ftp. Also, if mod_reqtimeout used the pre_connection hook, it - * would be inserted on mod_proxy's backend connections. + * e.g. mod_ftp. We still process it first though, for the handshake stage + * to work with/before mod_ssl, but since it's disabled by default it won't + * influence non-HTTP modules unless configured explicitely. Also, if + * mod_reqtimeout used the pre_connection hook, it would be inserted on + * mod_proxy's backend connections, and we don't want this. */ ap_hook_process_connection(reqtimeout_init, NULL, NULL, APR_HOOK_FIRST); -- 2.50.1