diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index d9d0c22e3..5bd965b2c 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -307,6 +307,7 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r) c = r->connection; rb = r->request_body; flush = 1; + n = NGX_AGAIN; ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http read client request body"); @@ -432,7 +433,7 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r) break; } - if (!c->read->ready || rb->rest == 0) { + if (n == NGX_AGAIN || !c->read->ready || rb->rest == 0) { clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); ngx_add_timer(c->read, clcf->client_body_timeout);