Skip to content

Commit

Permalink
HTTP/2: prevented creating temp files for requests without body.
Browse files Browse the repository at this point in the history
The problem was introduced by 52bd8cc17f34.
  • Loading branch information
VBart committed Dec 10, 2016
1 parent 5d496d4 commit 27c7ed6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/http/v2/ngx_http_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 27c7ed6

Please sign in to comment.