fix big client body receiving with deferred accept()

This commit is contained in:
Igor Sysoev 2006-11-13 20:40:17 +00:00
parent ff3540af3a
commit 12c94ae212

View File

@ -264,6 +264,7 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http read client request body");
for ( ;; ) {
for ( ;; ) {
if (rb->buf->last == rb->buf->end) {
@ -316,7 +317,11 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r)
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http client request body rest %uz", rb->rest);
if (rb->rest) {
if (rb->rest == 0) {
break;
}
if (!c->read->ready) {
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
ngx_add_timer(c->read, clcf->client_body_timeout);
@ -326,6 +331,7 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r)
return NGX_AGAIN;
}
}
if (c->read->timer_set) {
ngx_del_timer(c->read);