aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2023-02-27 14:00:56 +0400
committerRoman Arutyunyan <arut@nginx.com>2023-02-27 14:00:56 +0400
commit815ef96124176baef4e940c4beaec158305b368a (patch)
treeef62d1240eae60059e678eb5801caeffa8f14bba /src/http/ngx_http.c
parenta36ebf7e95baebf445b0973bd270bc009b0b0e9a (diff)
downloadnginx-815ef96124176baef4e940c4beaec158305b368a.tar.gz
nginx-815ef96124176baef4e940c4beaec158305b368a.zip
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.
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r--src/http/ngx_http.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 134eed944..8ccf3c198 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1242,6 +1242,7 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
#endif
#if (NGX_HTTP_V3)
ngx_uint_t http3;
+ ngx_uint_t quic;
#endif
/*
@@ -1280,6 +1281,7 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
#endif
#if (NGX_HTTP_V3)
http3 = lsopt->http3 || addr[i].opt.http3;
+ quic = lsopt->quic || addr[i].opt.quic;
#endif
if (lsopt->set) {
@@ -1319,6 +1321,7 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
#endif
#if (NGX_HTTP_V3)
addr[i].opt.http3 = http3;
+ addr[i].opt.quic = quic;
#endif
return NGX_OK;
@@ -1823,7 +1826,7 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr)
#if (NGX_HTTP_V3)
- ls->quic = addr->opt.http3;
+ ls->quic = addr->opt.quic;
if (ls->quic) {
ngx_rbtree_init(&ls->rbtree, &ls->sentinel,
@@ -1866,6 +1869,7 @@ ngx_http_add_addrs(ngx_conf_t *cf, ngx_http_port_t *hport,
#endif
#if (NGX_HTTP_V3)
addrs[i].conf.http3 = addr[i].opt.http3;
+ addrs[i].conf.quic = addr[i].opt.quic;
#endif
addrs[i].conf.proxy_protocol = addr[i].opt.proxy_protocol;
@@ -1934,6 +1938,7 @@ ngx_http_add_addrs6(ngx_conf_t *cf, ngx_http_port_t *hport,
#endif
#if (NGX_HTTP_V3)
addrs6[i].conf.http3 = addr[i].opt.http3;
+ addrs6[i].conf.quic = addr[i].opt.quic;
#endif
addrs6[i].conf.proxy_protocol = addr[i].opt.proxy_protocol;