Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2016-12-10 13:23:38 +0300
committerValentin Bartenev <vbart@nginx.com>2016-12-10 13:23:38 +0300
commit27c7ed683bc28e537f39d7717cce4ec111068dca (patch)
treece16b7162f5717afa3d72d6e1264b1ceaf1444d4
parent5d496d467d35abd4014f825de3c572eaa4011a24 (diff)
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.c6
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 b9ebcd8ce..f3050f1db 100644
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -3552,8 +3552,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);