diff 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
line wrap: on
line diff
--- 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_ht
 
 #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(ng
 {
     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;