[nginx] HTTP/2: prevented creating temp files for requests without body.
Valentin Bartenev
vbart at nginx.com
Sat Dec 10 10:34:16 UTC 2016
details: http://hg.nginx.org/nginx/rev/e02f1977846b
branches:
changeset: 6834:e02f1977846b
user: Valentin Bartenev <vbart at nginx.com>
date: Sat Dec 10 13:23:38 2016 +0300
description:
HTTP/2: prevented creating temp files for requests without body.
The problem was introduced by 52bd8cc17f34.
diffstat:
src/http/v2/ngx_http_v2.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (16 lines):
diff -r 3834951e32ab -r e02f1977846b src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Mon Nov 28 20:58:14 2016 +0300
+++ b/src/http/v2/ngx_http_v2.c Sat Dec 10 13:23:38 2016 +0300
@@ -3552,8 +3552,10 @@ ngx_http_v2_read_request_body(ngx_http_r
rb->buf = ngx_create_temp_buf(r->pool, (size_t) len);
} else {
- /* enforce writing body to file */
- r->request_body_in_file_only = 1;
+ if (stream->preread) {
+ /* enforce writing preread buffer to file */
+ r->request_body_in_file_only = 1;
+ }
rb->buf = ngx_calloc_buf(r->pool);
More information about the nginx-devel
mailing list