@@ -566,7 +566,7 @@ ngx_http_modsecurity_load_request_body(ngx_http_request_t *r)
566
566
ngx_http_modsecurity_ctx_t * ctx ;
567
567
ngx_chain_t * chain ;
568
568
569
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
569
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
570
570
"ModSec: loading request body." );
571
571
572
572
ctx = ngx_http_get_module_ctx (r , ngx_http_modsecurity );
@@ -583,7 +583,7 @@ ngx_http_modsecurity_load_request_body(ngx_http_request_t *r)
583
583
584
584
#ifdef MOVE_REQUEST_CHAIN_TO_MODSEC
585
585
if (move_chain_to_brigade (chain , ctx -> brigade , r -> pool , 1 ) != NGX_OK ) {
586
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
586
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
587
587
"ModSec: failed to move chain to brigade." );
588
588
589
589
return NGX_ERROR ;
@@ -592,7 +592,7 @@ ngx_http_modsecurity_load_request_body(ngx_http_request_t *r)
592
592
r -> request_body = NULL ;
593
593
#else
594
594
if (copy_chain_to_brigade (chain , ctx -> brigade , r -> pool , 1 ) != NGX_OK ) {
595
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
595
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
596
596
"ModSec: failed to copy chain to brigade." );
597
597
598
598
return NGX_ERROR ;
@@ -639,7 +639,7 @@ ngx_http_modsecurity_save_request_body(ngx_http_request_t *r)
639
639
640
640
r -> headers_in .content_length_n = content_length ;
641
641
642
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
642
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
643
643
"ModSec: Content length: %O, Content length n: %O" , content_length ,
644
644
r -> headers_in .content_length_n );
645
645
#else
@@ -908,25 +908,25 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
908
908
909
909
ctx = ngx_http_get_module_pool_ctx (r , ngx_http_modsecurity );
910
910
911
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
911
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
912
912
"ModSec: starting to process the request..." );
913
913
914
914
if (ngx_http_modsecurity_load_request (r ) != NGX_OK ) {
915
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
915
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
916
916
"ModSec: failed while loading the request." );
917
917
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
918
918
}
919
919
920
920
if (ngx_http_modsecurity_load_headers_in (r ) != NGX_OK ) {
921
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
921
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
922
922
"ModSec: failed while loading the headers." );
923
923
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
924
924
}
925
925
926
926
rc = modsecProcessRequestHeaders (ctx -> req );
927
927
rc = ngx_http_modsecurity_status (r , rc );
928
928
if (rc != NGX_DECLINED ) {
929
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
929
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
930
930
"ModSec: failed while processing the request headers" );
931
931
return rc ;
932
932
}
@@ -946,32 +946,32 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
946
946
modsecContextState (ctx -> req ) != MODSEC_DISABLED ) {
947
947
948
948
load_request_body = 1 ;
949
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
949
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
950
950
"ModSec: request body will be processed..." );
951
951
}
952
952
953
953
if (load_request_body == 1 ) {
954
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
954
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
955
955
"ModSec: loading request body..." );
956
956
957
957
rc = ngx_http_modsecurity_load_request_body (r );
958
958
if (rc != NGX_OK )
959
959
{
960
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
960
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
961
961
"ModSec: failed while loading the request body." );
962
962
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
963
963
}
964
964
965
965
966
966
}
967
967
968
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
968
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
969
969
"ModSec: processing request body..." );
970
970
rc = modsecProcessRequestBody (ctx -> req );
971
971
rc = ngx_http_modsecurity_status (r , rc );
972
972
if (rc != NGX_DECLINED )
973
973
{
974
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
974
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
975
975
"ModSec: finalizing the connection after process the " \
976
976
"request body." );
977
977
@@ -980,13 +980,13 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
980
980
if (load_request_body == 1 ) {
981
981
if (ngx_http_modsecurity_save_request_body (r ) != NGX_OK )
982
982
{
983
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
983
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
984
984
"ModSec: failed while saving the request body" );
985
985
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
986
986
}
987
987
if (ngx_http_modsecurity_save_headers_in (r ) != NGX_OK )
988
988
{
989
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
989
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
990
990
"ModSec: failed while saving the headers in" );
991
991
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
992
992
}
@@ -1193,7 +1193,7 @@ ngx_http_modsecurity_handler(ngx_http_request_t *r) {
1193
1193
}
1194
1194
1195
1195
if (ctx -> body_requested == 0 ) {
1196
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1196
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1197
1197
"ModSec: asking for the request body, if any." );
1198
1198
1199
1199
ctx -> body_requested = 1 ;
@@ -1389,7 +1389,7 @@ ngx_http_modsecurity_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
1389
1389
1390
1390
rc = move_brigade_to_chain (ctx -> brigade , & out , r -> pool );
1391
1391
if (rc == NGX_ERROR ) {
1392
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1392
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1393
1393
"ModSec: Problems moving brigade to chain" );
1394
1394
1395
1395
return ngx_http_filter_finalize_request (r ,
0 commit comments