comparison src/http/v2/ngx_http_v2.c @ 6834:e02f1977846b

HTTP/2: prevented creating temp files for requests without body. The problem was introduced by 52bd8cc17f34.
author Valentin Bartenev <vbart@nginx.com>
date Sat, 10 Dec 2016 13:23:38 +0300
parents 3834951e32ab
children 052305810ca4
comparison
equal deleted inserted replaced
6833:3834951e32ab 6834:e02f1977846b
3550 && !r->request_body_in_file_only) 3550 && !r->request_body_in_file_only)
3551 { 3551 {
3552 rb->buf = ngx_create_temp_buf(r->pool, (size_t) len); 3552 rb->buf = ngx_create_temp_buf(r->pool, (size_t) len);
3553 3553
3554 } else { 3554 } else {
3555 /* enforce writing body to file */ 3555 if (stream->preread) {
3556 r->request_body_in_file_only = 1; 3556 /* enforce writing preread buffer to file */
3557 r->request_body_in_file_only = 1;
3558 }
3557 3559
3558 rb->buf = ngx_calloc_buf(r->pool); 3560 rb->buf = ngx_calloc_buf(r->pool);
3559 3561
3560 if (rb->buf != NULL) { 3562 if (rb->buf != NULL) {
3561 rb->buf->sync = 1; 3563 rb->buf->sync = 1;