diff options
| author | Valentin Bartenev <vbart@nginx.com> | 2016-04-01 15:57:10 +0300 |
|---|---|---|
| committer | Valentin Bartenev <vbart@nginx.com> | 2016-04-01 15:57:10 +0300 |
| commit | 74ee55ec1b49266865646d488026f3e6802e1b85 (patch) | |
| tree | 6a9376e6c4140326d1ac0fbe3a2f9287e88a04da /src/http/ngx_http_request_body.c | |
| parent | 948eeca222c67dc6954ec0e68bf5c18e97e1a784 (diff) | |
| download | nginx-74ee55ec1b49266865646d488026f3e6802e1b85.tar.gz nginx-74ee55ec1b49266865646d488026f3e6802e1b85.tar.bz2 | |
HTTP/2: support for unbuffered upload of request body.
Diffstat (limited to 'src/http/ngx_http_request_body.c')
| -rw-r--r-- | src/http/ngx_http_request_body.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index 55e7d0802..0641329c5 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -48,7 +48,6 @@ ngx_http_read_client_request_body(ngx_http_request_t *r, #if (NGX_HTTP_V2) if (r->stream) { - r->request_body_no_buffering = 0; rc = ngx_http_v2_read_request_body(r, post_handler); goto done; } @@ -215,6 +214,18 @@ ngx_http_read_unbuffered_request_body(ngx_http_request_t *r) { ngx_int_t rc; +#if (NGX_HTTP_V2) + if (r->stream) { + rc = ngx_http_v2_read_unbuffered_request_body(r); + + if (rc == NGX_OK) { + r->reading_body = 0; + } + + return rc; + } +#endif + if (r->connection->read->timedout) { r->connection->timedout = 1; return NGX_HTTP_REQUEST_TIME_OUT; |
