Mercurial > hg > nginx
comparison src/http/ngx_http_request_body.c @ 6067:231a5bbd9e9c
Request body: always flush buffers if request buffering is off.
This fixes unbuffered proxying to SSL backends, since it prevents
ngx_ssl_send_chain() from accumulation of request body in the SSL
buffer.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 06 Apr 2015 19:20:36 +0300 |
parents | a08fad30aeac |
children | 257b51c37c5a |
comparison
equal
deleted
inserted
replaced
6066:657f6ec01da0 | 6067:231a5bbd9e9c |
---|---|
947 b->tag = (ngx_buf_tag_t) &ngx_http_read_client_request_body; | 947 b->tag = (ngx_buf_tag_t) &ngx_http_read_client_request_body; |
948 b->start = cl->buf->pos; | 948 b->start = cl->buf->pos; |
949 b->pos = cl->buf->pos; | 949 b->pos = cl->buf->pos; |
950 b->last = cl->buf->last; | 950 b->last = cl->buf->last; |
951 b->end = cl->buf->end; | 951 b->end = cl->buf->end; |
952 b->flush = r->request_body_no_buffering; | |
952 | 953 |
953 size = cl->buf->last - cl->buf->pos; | 954 size = cl->buf->last - cl->buf->pos; |
954 | 955 |
955 if ((off_t) size < rb->rest) { | 956 if ((off_t) size < rb->rest) { |
956 cl->buf->pos = cl->buf->last; | 957 cl->buf->pos = cl->buf->last; |
1054 b->tag = (ngx_buf_tag_t) &ngx_http_read_client_request_body; | 1055 b->tag = (ngx_buf_tag_t) &ngx_http_read_client_request_body; |
1055 b->start = cl->buf->pos; | 1056 b->start = cl->buf->pos; |
1056 b->pos = cl->buf->pos; | 1057 b->pos = cl->buf->pos; |
1057 b->last = cl->buf->last; | 1058 b->last = cl->buf->last; |
1058 b->end = cl->buf->end; | 1059 b->end = cl->buf->end; |
1060 b->flush = r->request_body_no_buffering; | |
1059 | 1061 |
1060 *ll = tl; | 1062 *ll = tl; |
1061 ll = &tl->next; | 1063 ll = &tl->next; |
1062 | 1064 |
1063 size = cl->buf->last - cl->buf->pos; | 1065 size = cl->buf->last - cl->buf->pos; |