@@ -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
@@ -914,25 +914,25 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
914
914
915
915
ctx = ngx_http_get_module_pool_ctx (r , ngx_http_modsecurity );
916
916
917
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
917
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
918
918
"ModSec: starting to process the request..." );
919
919
920
920
if (ngx_http_modsecurity_load_request (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 request." );
923
923
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
924
924
}
925
925
926
926
if (ngx_http_modsecurity_load_headers_in (r ) != NGX_OK ) {
927
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
927
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
928
928
"ModSec: failed while loading the headers." );
929
929
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
930
930
}
931
931
932
932
rc = modsecProcessRequestHeaders (ctx -> req );
933
933
rc = ngx_http_modsecurity_status (r , rc );
934
934
if (rc != NGX_DECLINED ) {
935
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
935
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
936
936
"ModSec: failed while processing the request headers" );
937
937
return rc ;
938
938
}
@@ -952,32 +952,32 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
952
952
modsecContextState (ctx -> req ) != MODSEC_DISABLED ) {
953
953
954
954
load_request_body = 1 ;
955
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
955
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
956
956
"ModSec: request body will be processed..." );
957
957
}
958
958
959
959
if (load_request_body == 1 ) {
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: loading request body..." );
962
962
963
963
rc = ngx_http_modsecurity_load_request_body (r );
964
964
if (rc != NGX_OK )
965
965
{
966
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
966
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
967
967
"ModSec: failed while loading the request body." );
968
968
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
969
969
}
970
970
971
971
972
972
}
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: processing request body..." );
976
976
rc = modsecProcessRequestBody (ctx -> req );
977
977
rc = ngx_http_modsecurity_status (r , rc );
978
978
if (rc != NGX_DECLINED )
979
979
{
980
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
980
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
981
981
"ModSec: finalizing the connection after process the " \
982
982
"request body." );
983
983
@@ -986,13 +986,13 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
986
986
if (load_request_body == 1 ) {
987
987
if (ngx_http_modsecurity_save_request_body (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 request body" );
991
991
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
992
992
}
993
993
if (ngx_http_modsecurity_save_headers_in (r ) != NGX_OK )
994
994
{
995
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
995
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
996
996
"ModSec: failed while saving the headers in" );
997
997
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
998
998
}
@@ -1199,7 +1199,7 @@ ngx_http_modsecurity_handler(ngx_http_request_t *r) {
1199
1199
}
1200
1200
1201
1201
if (ctx -> body_requested == 0 ) {
1202
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1202
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1203
1203
"ModSec: asking for the request body, if any." );
1204
1204
1205
1205
ctx -> body_requested = 1 ;
@@ -1395,7 +1395,7 @@ ngx_http_modsecurity_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
1395
1395
1396
1396
rc = move_brigade_to_chain (ctx -> brigade , & out , r -> pool );
1397
1397
if (rc == NGX_ERROR ) {
1398
- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1398
+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
1399
1399
"ModSec: Problems moving brigade to chain" );
1400
1400
1401
1401
return ngx_http_filter_finalize_request (r ,
0 commit comments