discard request body in cycle

This commit is contained in:
Igor Sysoev 2007-08-06 15:18:24 +00:00
parent b2d3a541ea
commit e5d4020612

View File

@ -501,6 +501,7 @@ ngx_http_read_discarded_body(ngx_http_request_t *r)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http read discarded body");
do {
if (r->headers_in.content_length_n == 0) {
return NGX_OK;
}
@ -529,5 +530,7 @@ ngx_http_read_discarded_body(ngx_http_request_t *r)
r->headers_in.content_length_n -= n;
} while (r->connection->read->ready);
return NGX_OK;
}