]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: improved handling of preread unbuffered requests.
authorMaxim Dounin <mdounin@mdounin.ru>
Sun, 29 Aug 2021 19:20:44 +0000 (22:20 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Sun, 29 Aug 2021 19:20:44 +0000 (22:20 +0300)
Previously, fully preread unbuffered requests larger than client body
buffer size were saved to disk, despite the fact that "unbuffered" is
expected to imply no disk buffering.

src/http/v2/ngx_http_v2.c

index a037e7a5205847adcb3db5c1b4184f9f39028a1e..9e248758d2e0fb0ac7af222f76aa909a73097c72 100644 (file)
@@ -4039,7 +4039,7 @@ ngx_http_v2_read_request_body(ngx_http_request_t *r)
         len++;
     }
 
-    if (r->request_body_no_buffering && !stream->in_closed) {
+    if (r->request_body_no_buffering) {
 
         /*
          * We need a room to store data up to the stream's initial window size,