comparison src/http/v3/ngx_http_v3.c @ 9047:c851a2ed5ce8 quic

HTTP/3: "quic" parameter of "listen" directive. Now "listen" directve has a new "quic" parameter which enables QUIC protocol for the address. Further, to enable HTTP/3, a new directive "http3" is introduced. The hq-interop protocol is enabled by "http3_hq" as before. Now application protocol is chosen by ALPN. Previously used "http3" parameter of "listen" is deprecated.
author Roman Arutyunyan <arut@nginx.com>
date Mon, 27 Feb 2023 14:00:56 +0400
parents b0c2234aaa9f
children 394e9a2cefc4
comparison
equal deleted inserted replaced
9046:7da4791e0264 9047:c851a2ed5ce8
15 15
16 16
17 ngx_int_t 17 ngx_int_t
18 ngx_http_v3_init_session(ngx_connection_t *c) 18 ngx_http_v3_init_session(ngx_connection_t *c)
19 { 19 {
20 ngx_pool_cleanup_t *cln; 20 ngx_pool_cleanup_t *cln;
21 ngx_http_connection_t *hc; 21 ngx_http_connection_t *hc;
22 ngx_http_v3_session_t *h3c; 22 ngx_http_v3_session_t *h3c;
23 #if (NGX_HTTP_V3_HQ)
24 ngx_http_v3_srv_conf_t *h3scf;
25 #endif
26 23
27 hc = c->data; 24 hc = c->data;
28 25
29 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 init session"); 26 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 init session");
30 27
33 goto failed; 30 goto failed;
34 } 31 }
35 32
36 h3c->max_push_id = (uint64_t) -1; 33 h3c->max_push_id = (uint64_t) -1;
37 h3c->goaway_push_id = (uint64_t) -1; 34 h3c->goaway_push_id = (uint64_t) -1;
38
39 #if (NGX_HTTP_V3_HQ)
40 h3scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v3_module);
41 if (h3scf->hq) {
42 h3c->hq = 1;
43 }
44 #endif
45 35
46 ngx_queue_init(&h3c->blocked); 36 ngx_queue_init(&h3c->blocked);
47 ngx_queue_init(&h3c->pushing); 37 ngx_queue_init(&h3c->pushing);
48 38
49 h3c->keepalive.log = c->log; 39 h3c->keepalive.log = c->log;