{
/*
* 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);
* 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);