# HG changeset patch # User Roman Arutyunyan # Date 1631267962 -10800 # Node ID 97cf8284fd19b30169231e43831e7787baba72f2 # Parent 7189cb2b4c5d2634ea8f84e94557f4c3ee659d5d Request body: do not create temp file if there's nothing to write. Do this only when the entire request body is empty and r->request_body_in_file_only is set. The issue manifested itself with missing warning "a client request body is buffered to a temporary file" when the entire rb->buf is full and all buffers are delayed by a filter. 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 @@ -1309,7 +1309,7 @@ ngx_http_request_body_save_filter(ngx_ht if (rb->rest > 0) { - if (rb->buf && rb->buf->last == rb->buf->end + if (rb->bufs && rb->buf && rb->buf->last == rb->buf->end && ngx_http_write_request_body(r) != NGX_OK) { return NGX_HTTP_INTERNAL_SERVER_ERROR;