# HG changeset patch # User Igor Sysoev # Date 1188229126 0 # Node ID 65dd057f71c756abf11cee97517361ea60b7af9e # Parent 24778e7450afbe9fab2b22ae94368d5f78550847 cancel discarding body on EOF diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -571,6 +571,10 @@ ngx_http_read_discarded_request_body(ngx return NGX_AGAIN; } + if (n == 0) { + return NGX_OK; + } + r->headers_in.content_length_n -= n; } while (r->connection->read->ready);