comparison src/http/ngx_http_request_body.c @ 8652:97cf8284fd19

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.
author Roman Arutyunyan <arut@nginx.com>
date Fri, 10 Sep 2021 12:59:22 +0300
parents 9cf043a5d9ca
children 61d0fa67b55e
comparison
equal deleted inserted replaced
8651:7189cb2b4c5d 8652:97cf8284fd19
1307 return NGX_OK; 1307 return NGX_OK;
1308 } 1308 }
1309 1309
1310 if (rb->rest > 0) { 1310 if (rb->rest > 0) {
1311 1311
1312 if (rb->buf && rb->buf->last == rb->buf->end 1312 if (rb->bufs && rb->buf && rb->buf->last == rb->buf->end
1313 && ngx_http_write_request_body(r) != NGX_OK) 1313 && ngx_http_write_request_body(r) != NGX_OK)
1314 { 1314 {
1315 return NGX_HTTP_INTERNAL_SERVER_ERROR; 1315 return NGX_HTTP_INTERNAL_SERVER_ERROR;
1316 } 1316 }
1317 1317