diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2020-02-28 13:09:51 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2020-02-28 13:09:51 +0300 |
commit | 26ac1c73f0fe90c77cbad84a6b4ef5712e35ba52 (patch) | |
tree | 9860cd3f43f9fae5b3d5656b273b4910c504835e /src/http/ngx_http.c | |
parent | e92cb24f40b865e3cc5b9f0993e328e4f0642e0f (diff) | |
download | nginx-26ac1c73f0fe90c77cbad84a6b4ef5712e35ba52.tar.gz nginx-26ac1c73f0fe90c77cbad84a6b4ef5712e35ba52.zip |
Initial QUIC support in http.
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r-- | src/http/ngx_http.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 3e82dc60d..10f88fabb 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1203,6 +1203,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, #if (NGX_HTTP_V2) ngx_uint_t http2; #endif +#if (NGX_HTTP_SSL) + ngx_uint_t http3; +#endif /* * we cannot compare whole sockaddr struct's as kernel @@ -1238,6 +1241,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, #if (NGX_HTTP_V2) http2 = lsopt->http2 || addr[i].opt.http2; #endif +#if (NGX_HTTP_SSL) + http3 = lsopt->http3 || addr[i].opt.http3; +#endif if (lsopt->set) { @@ -1274,6 +1280,9 @@ ngx_http_add_addresses(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, #if (NGX_HTTP_V2) addr[i].opt.http2 = http2; #endif +#if (NGX_HTTP_SSL) + addr[i].opt.http3 = http3; +#endif return NGX_OK; } @@ -1317,6 +1326,17 @@ ngx_http_add_address(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, #endif +#if (NGX_HTTP_SSL && !defined NGX_OPENSSL_QUIC) + + if (lsopt->http3) { + 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", + &lsopt->addr_text); + } + +#endif + addr = ngx_array_push(&port->addrs); if (addr == NULL) { return NGX_ERROR; @@ -1807,6 +1827,9 @@ ngx_http_add_addrs(ngx_conf_t *cf, ngx_http_port_t *hport, #if (NGX_HTTP_V2) addrs[i].conf.http2 = addr[i].opt.http2; #endif +#if (NGX_HTTP_SSL) + addrs[i].conf.http3 = addr[i].opt.http3; +#endif addrs[i].conf.proxy_protocol = addr[i].opt.proxy_protocol; if (addr[i].hash.buckets == NULL @@ -1872,6 +1895,9 @@ ngx_http_add_addrs6(ngx_conf_t *cf, ngx_http_port_t *hport, #if (NGX_HTTP_V2) addrs6[i].conf.http2 = addr[i].opt.http2; #endif +#if (NGX_HTTP_SSL) + addrs6[i].conf.http3 = addr[i].opt.http3; +#endif addrs6[i].conf.proxy_protocol = addr[i].opt.proxy_protocol; if (addr[i].hash.buckets == NULL |