diff options
author | Valentin Bartenev <vbart@nginx.com> | 2016-12-10 13:23:38 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2016-12-10 13:23:38 +0300 |
commit | d222e90b62c9c245f069d73502f86166d574c97b (patch) | |
tree | e3aba4e0d82dea8d73b6b49ab572742af93e494f | |
parent | 9ab91422d0b496964f971ba4b058c158fb6b9912 (diff) | |
download | nginx-d222e90b62c9c245f069d73502f86166d574c97b.tar.gz |
HTTP/2: prevented creating temp files for requests without body.
The problem was introduced by 52bd8cc17f34.
-rw-r--r-- | src/http/v2/ngx_http_v2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index 53a9c26e9..421ec6e94 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -3537,8 +3537,10 @@ ngx_http_v2_read_request_body(ngx_http_request_t *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); |