]> git.kaiwu.me - nginx.git/commitdiff
Request body: improved logging.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 9 Nov 2020 19:40:53 +0000 (22:40 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 9 Nov 2020 19:40:53 +0000 (22:40 +0300)
Added logging before returning NGX_HTTP_INTERNAL_SERVER_ERROR if there
are busy buffers after a request body flush.  This should never happen
with current code, though bugs can be introduced by 3rd party modules.
Make sure debugging will be easy enough.

src/http/ngx_http_request_body.c

index f3b938382f84d04d2e51b730ee18ebba30829843..07e78d780dc4a8c7b0e3971371e32bec3c787261 100644 (file)
@@ -305,6 +305,9 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r)
                         return NGX_AGAIN;
                     }
 
+                    ngx_log_error(NGX_LOG_ALERT, c->log, 0,
+                                  "busy buffers after request body flush");
+
                     return NGX_HTTP_INTERNAL_SERVER_ERROR;
                 }