diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2012-11-26 17:59:30 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-11-26 17:59:30 +0000 |
commit | 61feb90d74b9373a9089a09bbbb8c04629672d4f (patch) | |
tree | 586c1486d0bbfb857b916f8af386c6fb8e4bfed0 /src/http/ngx_http_request_body.c | |
parent | a94a101c79a4d6d14eaffb210d2e7d0afb3de7b0 (diff) | |
download | nginx-61feb90d74b9373a9089a09bbbb8c04629672d4f.tar.gz nginx-61feb90d74b9373a9089a09bbbb8c04629672d4f.zip |
Request body: fixed discard of chunked request body.
Even if there is no preread data, make sure to always call
ngx_http_discard_request_body_filter() in case of chunked request
body to initialize r->headers_in.content_length_n for later use.
Diffstat (limited to 'src/http/ngx_http_request_body.c')
-rw-r--r-- | src/http/ngx_http_request_body.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index 931694ebe..90da11005 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -459,7 +459,7 @@ ngx_http_discard_request_body(ngx_http_request_t *r) size = r->header_in->last - r->header_in->pos; - if (size) { + if (size || r->headers_in.chunked) { rc = ngx_http_discard_request_body_filter(r, r->header_in); if (rc != NGX_OK) { |