comparison src/http/ngx_http_request_body.c @ 4934:b61edaa04342

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 26 Nov 2012 17:59:30 +0000
parents 190fce68b6b5
children 7bd1c839af3b
comparison
equal deleted inserted replaced
4933:72e11139760b 4934:b61edaa04342
457 return NGX_OK; 457 return NGX_OK;
458 } 458 }
459 459
460 size = r->header_in->last - r->header_in->pos; 460 size = r->header_in->last - r->header_in->pos;
461 461
462 if (size) { 462 if (size || r->headers_in.chunked) {
463 rc = ngx_http_discard_request_body_filter(r, r->header_in); 463 rc = ngx_http_discard_request_body_filter(r, r->header_in);
464 464
465 if (rc != NGX_OK) { 465 if (rc != NGX_OK) {
466 return rc; 466 return rc;
467 } 467 }