@@ -566,7 +566,7 @@ ngx_http_modsecurity_load_request_body(ngx_http_request_t *r)
566566 ngx_http_modsecurity_ctx_t * ctx ;
567567 ngx_chain_t * chain ;
568568
569- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
569+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
570570 "ModSec: loading request body." );
571571
572572 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)
583583
584584#ifdef MOVE_REQUEST_CHAIN_TO_MODSEC
585585 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 ,
587587 "ModSec: failed to move chain to brigade." );
588588
589589 return NGX_ERROR ;
@@ -592,7 +592,7 @@ ngx_http_modsecurity_load_request_body(ngx_http_request_t *r)
592592 r -> request_body = NULL ;
593593#else
594594 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 ,
596596 "ModSec: failed to copy chain to brigade." );
597597
598598 return NGX_ERROR ;
@@ -639,7 +639,7 @@ ngx_http_modsecurity_save_request_body(ngx_http_request_t *r)
639639
640640 r -> headers_in .content_length_n = content_length ;
641641
642- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
642+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
643643 "ModSec: Content length: %O, Content length n: %O" , content_length ,
644644 r -> headers_in .content_length_n );
645645#else
@@ -908,25 +908,25 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
908908
909909 ctx = ngx_http_get_module_pool_ctx (r , ngx_http_modsecurity );
910910
911- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
911+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
912912 "ModSec: starting to process the request..." );
913913
914914 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 ,
916916 "ModSec: failed while loading the request." );
917917 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
918918 }
919919
920920 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 ,
922922 "ModSec: failed while loading the headers." );
923923 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
924924 }
925925
926926 rc = modsecProcessRequestHeaders (ctx -> req );
927927 rc = ngx_http_modsecurity_status (r , rc );
928928 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 ,
930930 "ModSec: failed while processing the request headers" );
931931 return rc ;
932932 }
@@ -946,32 +946,32 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
946946 modsecContextState (ctx -> req ) != MODSEC_DISABLED ) {
947947
948948 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 ,
950950 "ModSec: request body will be processed..." );
951951 }
952952
953953 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 ,
955955 "ModSec: loading request body..." );
956956
957957 rc = ngx_http_modsecurity_load_request_body (r );
958958 if (rc != NGX_OK )
959959 {
960- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
960+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
961961 "ModSec: failed while loading the request body." );
962962 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
963963 }
964964
965965
966966 }
967967
968- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
968+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
969969 "ModSec: processing request body..." );
970970 rc = modsecProcessRequestBody (ctx -> req );
971971 rc = ngx_http_modsecurity_status (r , rc );
972972 if (rc != NGX_DECLINED )
973973 {
974- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
974+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
975975 "ModSec: finalizing the connection after process the " \
976976 "request body." );
977977
@@ -980,13 +980,13 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
980980 if (load_request_body == 1 ) {
981981 if (ngx_http_modsecurity_save_request_body (r ) != NGX_OK )
982982 {
983- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
983+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
984984 "ModSec: failed while saving the request body" );
985985 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
986986 }
987987 if (ngx_http_modsecurity_save_headers_in (r ) != NGX_OK )
988988 {
989- ngx_log_debug (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
989+ ngx_log_debug0 (NGX_LOG_DEBUG_HTTP , r -> connection -> log , 0 ,
990990 "ModSec: failed while saving the headers in" );
991991 return NGX_HTTP_INTERNAL_SERVER_ERROR ;
992992 }
@@ -1193,7 +1193,7 @@ ngx_http_modsecurity_handler(ngx_http_request_t *r) {
11931193 }
11941194
11951195 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 ,
11971197 "ModSec: asking for the request body, if any." );
11981198
11991199 ctx -> body_requested = 1 ;
@@ -1389,7 +1389,7 @@ ngx_http_modsecurity_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
13891389
13901390 rc = move_brigade_to_chain (ctx -> brigade , & out , r -> pool );
13911391 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 ,
13931393 "ModSec: Problems moving brigade to chain" );
13941394
13951395 return ngx_http_filter_finalize_request (r ,
0 commit comments