Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 8456:c9538aef3211 quic
HTTP/3: refactored dynamic table implementation.
Previously dynamic table was not functional because of zero limit on its size
set by default. Now the following changes enable it:
- new directives to set SETTINGS_QPACK_MAX_TABLE_CAPACITY and
SETTINGS_QPACK_BLOCKED_STREAMS
- send settings with SETTINGS_QPACK_MAX_TABLE_CAPACITY and
SETTINGS_QPACK_BLOCKED_STREAMS to the client
- send Insert Count Increment to the client
- send Header Acknowledgement to the client
- evict old dynamic table entries on overflow
- decode Required Insert Count from client
- block stream if Required Insert Count is not reached
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 02 Jul 2020 15:34:05 +0300 |
parents | 833898b35b24 |
children | 72f9ff4e0a88 |
comparison
equal
deleted
inserted
replaced
8455:b0e81f49d7c0 | 8456:c9538aef3211 |
---|---|
221 ngx_http_in6_addr_t *addr6; | 221 ngx_http_in6_addr_t *addr6; |
222 #endif | 222 #endif |
223 | 223 |
224 #if (NGX_HTTP_V3) | 224 #if (NGX_HTTP_V3) |
225 if (c->type == SOCK_DGRAM) { | 225 if (c->type == SOCK_DGRAM) { |
226 hc = ngx_pcalloc(c->pool, sizeof(ngx_http_v3_connection_t)); | 226 ngx_http_v3_connection_t *h3c; |
227 | |
228 h3c = ngx_pcalloc(c->pool, sizeof(ngx_http_v3_connection_t)); | |
229 if (h3c == NULL) { | |
230 ngx_http_close_connection(c); | |
231 return; | |
232 } | |
233 | |
234 ngx_queue_init(&h3c->blocked); | |
235 | |
236 hc = &h3c->hc; | |
227 hc->quic = 1; | 237 hc->quic = 1; |
228 hc->ssl = 1; | 238 hc->ssl = 1; |
229 | 239 |
230 } else | 240 } else |
231 #endif | 241 #endif |
411 ngx_http_connection_t *hc; | 421 ngx_http_connection_t *hc; |
412 ngx_http_v3_connection_t *h3c; | 422 ngx_http_v3_connection_t *h3c; |
413 | 423 |
414 pc = c->qs->parent; | 424 pc = c->qs->parent; |
415 h3c = pc->data; | 425 h3c = pc->data; |
426 | |
427 if (!h3c->settings_sent) { | |
428 h3c->settings_sent = 1; | |
429 | |
430 /* TODO close QUIC connection on error */ | |
431 (void) ngx_http_v3_send_settings(c); | |
432 } | |
416 | 433 |
417 if (c->qs->id & NGX_QUIC_STREAM_UNIDIRECTIONAL) { | 434 if (c->qs->id & NGX_QUIC_STREAM_UNIDIRECTIONAL) { |
418 ngx_http_v3_handle_client_uni_stream(c); | 435 ngx_http_v3_handle_client_uni_stream(c); |
419 return; | 436 return; |
420 } | 437 } |
1253 ngx_http_process_request_headers(rev); | 1270 ngx_http_process_request_headers(rev); |
1254 | 1271 |
1255 break; | 1272 break; |
1256 } | 1273 } |
1257 | 1274 |
1258 if (rc == NGX_DONE) { | 1275 if (rc == NGX_BUSY) { |
1259 if (ngx_handle_read_event(rev, 0) != NGX_OK) { | 1276 if (ngx_handle_read_event(rev, 0) != NGX_OK) { |
1260 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 1277 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
1261 return; | 1278 return; |
1262 } | 1279 } |
1263 | 1280 |