# HG changeset patch # User Maxim Dounin # Date 1711764552 -10800 # Node ID b2e16e8639c80ce1cc8342c71043794c81b41367 # Parent 392e8e2fd22a8461e75a67d5d33d85c07974e1e3 Request body: improved c->read->ready flag handling. Previously, the c->read->ready flag was only checked when c->recv() wasn't able to fill the whole body buffer. Now the flag is also checked if the buffer is fully filled. This ensures that ev->available checks as introduced in 7583:efd71d49bde0 and 7584:9d2ad2fb4423 will be able to prevent reading from the socket when using event methods other than kqueue or epoll, and when using SSL. This might be important to avoid looping for a long time when reading request body from fast clients. 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 @@ -413,7 +413,7 @@ ngx_http_do_read_client_request_body(ngx break; } - if (rb->buf->last < rb->buf->end) { + if (!c->read->ready) { break; } }