Mercurial > hg > nginx
comparison src/http/ngx_http.c @ 8922:be08b858086a quic
HTTP/3: http3_hq directive and NGX_HTTP_V3_HQ macro.
Listen quic parameter is no longer supported.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Sat, 04 Dec 2021 10:52:55 +0300 |
parents | 33226ac61076 |
children | ad67fcc30567 |
comparison
equal
deleted
inserted
replaced
8921:33226ac61076 | 8922:be08b858086a |
---|---|
1239 #endif | 1239 #endif |
1240 #if (NGX_HTTP_V2) | 1240 #if (NGX_HTTP_V2) |
1241 ngx_uint_t http2; | 1241 ngx_uint_t http2; |
1242 #endif | 1242 #endif |
1243 #if (NGX_HTTP_V3) | 1243 #if (NGX_HTTP_V3) |
1244 ngx_uint_t quic; | |
1245 ngx_uint_t http3; | 1244 ngx_uint_t http3; |
1246 #endif | 1245 #endif |
1247 | 1246 |
1248 /* | 1247 /* |
1249 * we cannot compare whole sockaddr struct's as kernel | 1248 * we cannot compare whole sockaddr struct's as kernel |
1278 #endif | 1277 #endif |
1279 #if (NGX_HTTP_V2) | 1278 #if (NGX_HTTP_V2) |
1280 http2 = lsopt->http2 || addr[i].opt.http2; | 1279 http2 = lsopt->http2 || addr[i].opt.http2; |
1281 #endif | 1280 #endif |
1282 #if (NGX_HTTP_V3) | 1281 #if (NGX_HTTP_V3) |
1283 quic = lsopt->quic || addr[i].opt.quic; | |
1284 http3 = lsopt->http3 || addr[i].opt.http3; | 1282 http3 = lsopt->http3 || addr[i].opt.http3; |
1285 #endif | 1283 #endif |
1286 | 1284 |
1287 if (lsopt->set) { | 1285 if (lsopt->set) { |
1288 | 1286 |
1318 #endif | 1316 #endif |
1319 #if (NGX_HTTP_V2) | 1317 #if (NGX_HTTP_V2) |
1320 addr[i].opt.http2 = http2; | 1318 addr[i].opt.http2 = http2; |
1321 #endif | 1319 #endif |
1322 #if (NGX_HTTP_V3) | 1320 #if (NGX_HTTP_V3) |
1323 addr[i].opt.quic = quic; | |
1324 addr[i].opt.http3 = http3; | 1321 addr[i].opt.http3 = http3; |
1325 #endif | 1322 #endif |
1326 | 1323 |
1327 return NGX_OK; | 1324 return NGX_OK; |
1328 } | 1325 } |
1365 | 1362 |
1366 #endif | 1363 #endif |
1367 | 1364 |
1368 #if (NGX_HTTP_V3 && !defined NGX_QUIC) | 1365 #if (NGX_HTTP_V3 && !defined NGX_QUIC) |
1369 | 1366 |
1370 if (lsopt->quic) { | 1367 if (lsopt->http3) { |
1371 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, | 1368 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, |
1372 "nginx was built with OpenSSL that lacks QUIC " | 1369 "nginx was built with OpenSSL that lacks QUIC " |
1373 "support, QUIC is not enabled for %V", | 1370 "support, HTTP/3 is not enabled for %V", |
1374 &lsopt->addr_text); | 1371 &lsopt->addr_text); |
1375 } | 1372 } |
1376 | 1373 |
1377 #endif | 1374 #endif |
1378 | 1375 |
1834 #endif | 1831 #endif |
1835 | 1832 |
1836 ls->wildcard = addr->opt.wildcard; | 1833 ls->wildcard = addr->opt.wildcard; |
1837 | 1834 |
1838 #if (NGX_HTTP_V3) | 1835 #if (NGX_HTTP_V3) |
1839 ls->quic = addr->opt.quic; | 1836 ls->quic = addr->opt.http3; |
1840 #endif | 1837 #endif |
1841 | 1838 |
1842 return ls; | 1839 return ls; |
1843 } | 1840 } |
1844 | 1841 |
1870 #endif | 1867 #endif |
1871 #if (NGX_HTTP_V2) | 1868 #if (NGX_HTTP_V2) |
1872 addrs[i].conf.http2 = addr[i].opt.http2; | 1869 addrs[i].conf.http2 = addr[i].opt.http2; |
1873 #endif | 1870 #endif |
1874 #if (NGX_HTTP_V3) | 1871 #if (NGX_HTTP_V3) |
1875 addrs[i].conf.quic = addr[i].opt.quic; | |
1876 addrs[i].conf.http3 = addr[i].opt.http3; | 1872 addrs[i].conf.http3 = addr[i].opt.http3; |
1877 #endif | 1873 #endif |
1878 addrs[i].conf.proxy_protocol = addr[i].opt.proxy_protocol; | 1874 addrs[i].conf.proxy_protocol = addr[i].opt.proxy_protocol; |
1879 | 1875 |
1880 if (addr[i].hash.buckets == NULL | 1876 if (addr[i].hash.buckets == NULL |
1939 #endif | 1935 #endif |
1940 #if (NGX_HTTP_V2) | 1936 #if (NGX_HTTP_V2) |
1941 addrs6[i].conf.http2 = addr[i].opt.http2; | 1937 addrs6[i].conf.http2 = addr[i].opt.http2; |
1942 #endif | 1938 #endif |
1943 #if (NGX_HTTP_V3) | 1939 #if (NGX_HTTP_V3) |
1944 addrs6[i].conf.quic = addr[i].opt.quic; | |
1945 addrs6[i].conf.http3 = addr[i].opt.http3; | 1940 addrs6[i].conf.http3 = addr[i].opt.http3; |
1946 #endif | 1941 #endif |
1947 addrs6[i].conf.proxy_protocol = addr[i].opt.proxy_protocol; | 1942 addrs6[i].conf.proxy_protocol = addr[i].opt.proxy_protocol; |
1948 | 1943 |
1949 if (addr[i].hash.buckets == NULL | 1944 if (addr[i].hash.buckets == NULL |