Mercurial > hg > nginx
diff src/http/ngx_http.c @ 8481:0d2b2664b41c quic
QUIC: added "quic" listen parameter.
The parameter allows processing HTTP/0.9-2 over QUIC.
Also, introduced ngx_http_quic_module and moved QUIC settings there
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 21 Jul 2020 23:09:22 +0300 |
parents | 001ec7fce567 |
children | 13f7085b90d2 |
line wrap: on
line diff
--- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1200,10 +1200,13 @@ ngx_http_add_addresses(ngx_conf_t *cf, n #if (NGX_HTTP_SSL) ngx_uint_t ssl; #endif +#if (NGX_HTTP_QUIC) + ngx_uint_t quic; +#endif #if (NGX_HTTP_V2) ngx_uint_t http2; #endif -#if (NGX_HTTP_SSL) +#if (NGX_HTTP_V3) ngx_uint_t http3; #endif @@ -1238,10 +1241,13 @@ ngx_http_add_addresses(ngx_conf_t *cf, n #if (NGX_HTTP_SSL) ssl = lsopt->ssl || addr[i].opt.ssl; #endif +#if (NGX_HTTP_QUIC) + quic = lsopt->quic || addr[i].opt.quic; +#endif #if (NGX_HTTP_V2) http2 = lsopt->http2 || addr[i].opt.http2; #endif -#if (NGX_HTTP_SSL) +#if (NGX_HTTP_V3) http3 = lsopt->http3 || addr[i].opt.http3; #endif @@ -1277,10 +1283,13 @@ ngx_http_add_addresses(ngx_conf_t *cf, n #if (NGX_HTTP_SSL) addr[i].opt.ssl = ssl; #endif +#if (NGX_HTTP_QUIC) + addr[i].opt.quic = quic; +#endif #if (NGX_HTTP_V2) addr[i].opt.http2 = http2; #endif -#if (NGX_HTTP_SSL) +#if (NGX_HTTP_V3) addr[i].opt.http3 = http3; #endif @@ -1326,12 +1335,12 @@ ngx_http_add_address(ngx_conf_t *cf, ngx #endif -#if (NGX_HTTP_SSL && !defined NGX_OPENSSL_QUIC) - - if (lsopt->http3) { +#if (NGX_HTTP_QUIC && !defined NGX_OPENSSL_QUIC) + + if (lsopt->quic) { ngx_conf_log_error(NGX_LOG_WARN, cf, 0, "nginx was built with OpenSSL that lacks QUIC " - "support, HTTP/3 is not enabled for %V", + "support, QUIC is not enabled for %V", &lsopt->addr_text); } @@ -1797,8 +1806,8 @@ ngx_http_add_listening(ngx_conf_t *cf, n ls->wildcard = addr->opt.wildcard; -#if (NGX_HTTP_SSL) - ls->quic = addr->opt.http3; +#if (NGX_HTTP_QUIC) + ls->quic = addr->opt.quic; #endif return ls; @@ -1830,10 +1839,13 @@ ngx_http_add_addrs(ngx_conf_t *cf, ngx_h #if (NGX_HTTP_SSL) addrs[i].conf.ssl = addr[i].opt.ssl; #endif +#if (NGX_HTTP_QUIC) + addrs[i].conf.quic = addr[i].opt.quic; +#endif #if (NGX_HTTP_V2) addrs[i].conf.http2 = addr[i].opt.http2; #endif -#if (NGX_HTTP_SSL) +#if (NGX_HTTP_V3) addrs[i].conf.http3 = addr[i].opt.http3; #endif addrs[i].conf.proxy_protocol = addr[i].opt.proxy_protocol; @@ -1898,10 +1910,13 @@ ngx_http_add_addrs6(ngx_conf_t *cf, ngx_ #if (NGX_HTTP_SSL) addrs6[i].conf.ssl = addr[i].opt.ssl; #endif +#if (NGX_HTTP_QUIC) + addrs6[i].conf.quic = addr[i].opt.quic; +#endif #if (NGX_HTTP_V2) addrs6[i].conf.http2 = addr[i].opt.http2; #endif -#if (NGX_HTTP_SSL) +#if (NGX_HTTP_V3) addrs6[i].conf.http3 = addr[i].opt.http3; #endif addrs6[i].conf.proxy_protocol = addr[i].opt.proxy_protocol;