Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2.c @ 6892:169fef913184 stable-1.10
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 | 749bcfdf097a |
children |
comparison
equal
deleted
inserted
replaced
6891:749bcfdf097a | 6892:169fef913184 |
---|---|
3535 && !r->request_body_in_file_only) | 3535 && !r->request_body_in_file_only) |
3536 { | 3536 { |
3537 rb->buf = ngx_create_temp_buf(r->pool, (size_t) len); | 3537 rb->buf = ngx_create_temp_buf(r->pool, (size_t) len); |
3538 | 3538 |
3539 } else { | 3539 } else { |
3540 /* enforce writing body to file */ | 3540 if (stream->preread) { |
3541 r->request_body_in_file_only = 1; | 3541 /* enforce writing preread buffer to file */ |
3542 r->request_body_in_file_only = 1; | |
3543 } | |
3542 | 3544 |
3543 rb->buf = ngx_calloc_buf(r->pool); | 3545 rb->buf = ngx_calloc_buf(r->pool); |
3544 | 3546 |
3545 if (rb->buf != NULL) { | 3547 if (rb->buf != NULL) { |
3546 rb->buf->sync = 1; | 3548 rb->buf->sync = 1; |