Mercurial > hg > nginx
changeset 5110:0bbdd966a383
Request body: next upstream fix.
After introduction of chunked request body handling in 1.3.9 (r4931),
r->request_body->bufs buffers have b->start pointing to original buffer
start (and b->pos pointing to real data of this particular buffer).
While this is ok as per se, it caused bad things (usually original request
headers included before the request body) after reinit of the request
chain in ngx_http_upstream_reinit() while sending the request to a next
upstream server (which used to do b->pos = b->start for each buffer
in the request chain).
Patch by Piotr Sikora.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 14 Mar 2013 12:28:53 +0000 |
parents | 44bd04fbbb4f |
children | 57c3f84d72ce |
files | src/http/ngx_http_request_body.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_request_body.c Tue Mar 12 13:38:04 2013 +0000 +++ b/src/http/ngx_http_request_body.c Thu Mar 14 12:28:53 2013 +0000 @@ -826,7 +826,7 @@ b->temporary = 1; b->tag = (ngx_buf_tag_t) &ngx_http_read_client_request_body; - b->start = cl->buf->start; + b->start = cl->buf->pos; b->pos = cl->buf->pos; b->last = cl->buf->last; b->end = cl->buf->end; @@ -933,7 +933,7 @@ b->temporary = 1; b->tag = (ngx_buf_tag_t) &ngx_http_read_client_request_body; - b->start = cl->buf->start; + b->start = cl->buf->pos; b->pos = cl->buf->pos; b->last = cl->buf->last; b->end = cl->buf->end;