]> git.kaiwu.me - nginx.git/commitdiff
Request body: always flush buffers if request buffering is off.
authorValentin Bartenev <vbart@nginx.com>
Mon, 6 Apr 2015 16:20:36 +0000 (19:20 +0300)
committerValentin Bartenev <vbart@nginx.com>
Mon, 6 Apr 2015 16:20:36 +0000 (19:20 +0300)
This fixes unbuffered proxying to SSL backends, since it prevents
ngx_ssl_send_chain() from accumulation of request body in the SSL
buffer.

src/http/ngx_http_request_body.c

index ac5b530bac583dee65bcd26e40d3d09911ff9421..9c169845e7468391b963ce6e2bd14ca9aa8ff26e 100644 (file)
@@ -949,6 +949,7 @@ ngx_http_request_body_length_filter(ngx_http_request_t *r, ngx_chain_t *in)
         b->pos = cl->buf->pos;
         b->last = cl->buf->last;
         b->end = cl->buf->end;
+        b->flush = r->request_body_no_buffering;
 
         size = cl->buf->last - cl->buf->pos;
 
@@ -1056,6 +1057,7 @@ ngx_http_request_body_chunked_filter(ngx_http_request_t *r, ngx_chain_t *in)
                 b->pos = cl->buf->pos;
                 b->last = cl->buf->last;
                 b->end = cl->buf->end;
+                b->flush = r->request_body_no_buffering;
 
                 *ll = tl;
                 ll = &tl->next;