comparison src/http/v3/ngx_http_v3_request.c @ 8278:dbe33ef9cd9a quic

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.
author Roman Arutyunyan <arut@nginx.com>
date Fri, 29 Jan 2021 19:42:47 +0300
parents 916a2e1d6617
children 6bd8ed493b85
comparison
equal deleted inserted replaced
8277:27bd6dc24426 8278:dbe33ef9cd9a
156 156
157 for ( ;; ) { 157 for ( ;; ) {
158 158
159 if (b->pos == b->last) { 159 if (b->pos == b->last) {
160 160
161 if (!rev->ready) { 161 if (rev->ready) {
162 break; 162 n = c->recv(c, b->start, b->end - b->start);
163 } 163
164 164 } else {
165 n = c->recv(c, b->start, b->end - b->start); 165 n = NGX_AGAIN;
166 }
166 167
167 if (n == NGX_AGAIN) { 168 if (n == NGX_AGAIN) {
168 if (!rev->timer_set) { 169 if (!rev->timer_set) {
169 cscf = ngx_http_get_module_srv_conf(r, 170 cscf = ngx_http_get_module_srv_conf(r,
170 ngx_http_core_module); 171 ngx_http_core_module);