comparison src/http/ngx_http_request_body.c @ 6497:9d66d7ed2abb

HTTP/2: support for unbuffered upload of request body.
author Valentin Bartenev <vbart@nginx.com>
date Fri, 01 Apr 2016 15:57:10 +0300
parents 887cca40ba6a
children 92e771de7d89
comparison
equal deleted inserted replaced
6496:887cca40ba6a 6497:9d66d7ed2abb
46 return NGX_OK; 46 return NGX_OK;
47 } 47 }
48 48
49 #if (NGX_HTTP_V2) 49 #if (NGX_HTTP_V2)
50 if (r->stream) { 50 if (r->stream) {
51 r->request_body_no_buffering = 0;
52 rc = ngx_http_v2_read_request_body(r, post_handler); 51 rc = ngx_http_v2_read_request_body(r, post_handler);
53 goto done; 52 goto done;
54 } 53 }
55 #endif 54 #endif
56 55
213 ngx_int_t 212 ngx_int_t
214 ngx_http_read_unbuffered_request_body(ngx_http_request_t *r) 213 ngx_http_read_unbuffered_request_body(ngx_http_request_t *r)
215 { 214 {
216 ngx_int_t rc; 215 ngx_int_t rc;
217 216
217 #if (NGX_HTTP_V2)
218 if (r->stream) {
219 rc = ngx_http_v2_read_unbuffered_request_body(r);
220
221 if (rc == NGX_OK) {
222 r->reading_body = 0;
223 }
224
225 return rc;
226 }
227 #endif
228
218 if (r->connection->read->timedout) { 229 if (r->connection->read->timedout) {
219 r->connection->timedout = 1; 230 r->connection->timedout = 1;
220 return NGX_HTTP_REQUEST_TIME_OUT; 231 return NGX_HTTP_REQUEST_TIME_OUT;
221 } 232 }
222 233