Mercurial > hg > nginx
changeset 9254:cb1e214efe41
Request body: provided log action for reading request body.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 27 Apr 2024 18:19:07 +0300 |
parents | a6649497a762 |
children | 208a4adb82ef |
files | src/http/ngx_http_request_body.c src/http/v2/ngx_http_v2.c src/http/v3/ngx_http_v3_request.c |
diffstat | 3 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_request_body.c Sat Apr 27 18:18:36 2024 +0300 +++ b/src/http/ngx_http_request_body.c Sat Apr 27 18:19:07 2024 +0300 @@ -85,6 +85,8 @@ return NGX_OK; } + r->connection->log->action = "reading request body"; + #if (NGX_HTTP_V2) if (r->stream) { rc = ngx_http_v2_read_request_body(r); @@ -159,6 +161,7 @@ if (rb->rest == 0 && rb->last_saved) { /* the whole request body was pre-read */ r->request_body_no_buffering = 0; + r->connection->log->action = NULL; post_handler(r); return NGX_OK; } @@ -217,6 +220,7 @@ } r->read_event_handler = ngx_http_block_reading; + r->connection->log->action = NULL; post_handler(r); } @@ -456,6 +460,7 @@ if (!r->request_body_no_buffering) { r->read_event_handler = ngx_http_block_reading; + r->connection->log->action = NULL; rb->post_handler(r); }
--- a/src/http/v2/ngx_http_v2.c Sat Apr 27 18:18:36 2024 +0300 +++ b/src/http/v2/ngx_http_v2.c Sat Apr 27 18:19:07 2024 +0300 @@ -3807,6 +3807,7 @@ if (stream->skip_data) { r->request_body_no_buffering = 0; + r->connection->log->action = NULL; rb->post_handler(r); return NGX_OK; } @@ -4061,6 +4062,7 @@ } r->read_event_handler = ngx_http_block_reading; + r->connection->log->action = NULL; rb->post_handler(r); return NGX_OK;
--- a/src/http/v3/ngx_http_v3_request.c Sat Apr 27 18:18:36 2024 +0300 +++ b/src/http/v3/ngx_http_v3_request.c Sat Apr 27 18:19:07 2024 +0300 @@ -1250,6 +1250,7 @@ if (rb->rest == 0 && rb->last_saved) { /* the whole request body was pre-read */ r->request_body_no_buffering = 0; + r->connection->log->action = NULL; rb->post_handler(r); return NGX_OK; } @@ -1472,6 +1473,7 @@ if (!r->request_body_no_buffering) { r->read_event_handler = ngx_http_block_reading; + r->connection->log->action = NULL; rb->post_handler(r); }