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.
This commit is contained in:
Maxim Dounin 2012-11-26 17:59:30 +00:00
parent 22eb7ecb4d
commit bb3a948b99

View file

@ -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) {