[PATCH 08 of 14] Request body: improved debug logging
Maxim Dounin
mdounin at mdounin.ru
Sat Apr 20 00:59:56 UTC 2024
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1713574638 -10800
# Sat Apr 20 03:57:18 2024 +0300
# Node ID 976af6df50499768d08b176e9ae0ec0e1096ae88
# Parent 42c2333af8bacd65b50933119dcc47c9343f6cd2
Request body: improved debug logging.
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -48,6 +48,9 @@ ngx_http_read_client_request_body(ngx_ht
return NGX_OK;
}
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http read request body");
+
if (ngx_http_test_expect(r) != NGX_OK) {
rc = NGX_HTTP_INTERNAL_SERVER_ERROR;
goto done;
@@ -649,6 +652,9 @@ ngx_http_discard_request_body(ngx_http_r
return NGX_OK;
}
+ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http set discard body");
+
#if (NGX_HTTP_V2)
if (r->stream) {
r->stream->skip_data = 1;
@@ -668,8 +674,6 @@ ngx_http_discard_request_body(ngx_http_r
rev = r->connection->read;
- ngx_log_debug0(NGX_LOG_DEBUG_HTTP, rev->log, 0, "http set discard body");
-
if (rev->timer_set) {
ngx_del_timer(rev);
}
More information about the nginx-devel
mailing list