aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2021-01-29 19:42:47 +0300
committerRoman Arutyunyan <arut@nginx.com>2021-01-29 19:42:47 +0300
commitcd6253430051a823dc31b756e93aeecb5f674af3 (patch)
tree9145310497aeff160b9b4d91cc3aafe18dc9500c /src
parent68aa6fec77b06972a0a91223f08551569ecb5355 (diff)
downloadnginx-cd6253430051a823dc31b756e93aeecb5f674af3.tar.gz
nginx-cd6253430051a823dc31b756e93aeecb5f674af3.zip
HTTP/3: call ngx_handle_read_event() from client header handler.
This function should be called at the end of an event handler to prepare the event for the next handler call. Particularly, the "active" flag is set or cleared depending on data availability. With this call missing in one code path, read handler was not called again after handling the initial part of the client request, if the request was too big to fit into a single STREAM frame. Now ngx_handle_read_event() is called in this code path. Also, read timer is restarted.
Diffstat (limited to 'src')
-rw-r--r--src/http/v3/ngx_http_v3_request.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
index fb1626718..0b7954137 100644
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -158,11 +158,12 @@ ngx_http_v3_process_request(ngx_event_t *rev)
if (b->pos == b->last) {
- if (!rev->ready) {
- break;
- }
+ if (rev->ready) {
+ n = c->recv(c, b->start, b->end - b->start);
- n = c->recv(c, b->start, b->end - b->start);
+ } else {
+ n = NGX_AGAIN;
+ }
if (n == NGX_AGAIN) {
if (!rev->timer_set) {