@@ -194,6 +194,7 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re
194
194
195
195
if (intervention .status != 200 )
196
196
{
197
+ ngx_http_modsecurity_log_handler (r );
197
198
if (r -> header_sent )
198
199
{
199
200
dd ("Headers are already sent. Cannot perform the redirection at this point." );
@@ -461,22 +462,6 @@ ngx_http_modsecurity_init(ngx_conf_t *cf)
461
462
}
462
463
* h_preaccess = ngx_http_modsecurity_pre_access_handler ;
463
464
464
- /**
465
- * Process the log phase.
466
- *
467
- * TODO: check if the log phase happens like it happens on Apache.
468
- * check if last phase will not hold the request.
469
- *
470
- */
471
- h_log = ngx_array_push (& cmcf -> phases [NGX_HTTP_LOG_PHASE ].handlers );
472
- if (h_log == NULL )
473
- {
474
- dd ("Not able to create a new NGX_HTTP_LOG_PHASE handle" );
475
- return NGX_ERROR ;
476
- }
477
- * h_log = ngx_http_modsecurity_log_handler ;
478
-
479
-
480
465
rc = ngx_http_modsecurity_header_filter_init ();
481
466
if (rc != NGX_OK ) {
482
467
return rc ;
0 commit comments