Mercurial > hg > nginx
diff src/http/modules/ngx_http_ssl_module.c @ 8269:c9c3a73df6e8 quic
Support for HTTP/3 ALPN.
This is required by Chrome.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 23 Mar 2020 19:26:24 +0300 |
parents | 253cf267f95a |
children | 7995cd199b52 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_ssl_module.c Mon Mar 23 15:32:24 2020 +0300 +++ b/src/http/modules/ngx_http_ssl_module.c Mon Mar 23 19:26:24 2020 +0300 @@ -371,7 +371,7 @@ #if (NGX_DEBUG) unsigned int i; #endif -#if (NGX_HTTP_V2) +#if (NGX_HTTP_V2 || NGX_HTTP_V3) ngx_http_connection_t *hc; #endif #if (NGX_HTTP_V2 || NGX_DEBUG) @@ -388,9 +388,11 @@ } #endif -#if (NGX_HTTP_V2) +#if (NGX_HTTP_V2 || NGX_HTTP_V3) hc = c->data; +#endif +#if (NGX_HTTP_V2) if (hc->addr_conf->http2) { srv = (unsigned char *) NGX_HTTP_V2_ALPN_ADVERTISE NGX_HTTP_NPN_ADVERTISE; @@ -398,6 +400,12 @@ } else #endif +#if (NGX_HTTP_V3) + if (hc->addr_conf->http3) { + srv = (unsigned char *) NGX_HTTP_V3_ALPN_ADVERTISE; + srvlen = sizeof(NGX_HTTP_V3_ALPN_ADVERTISE) - 1; + } else +#endif { srv = (unsigned char *) NGX_HTTP_NPN_ADVERTISE; srvlen = sizeof(NGX_HTTP_NPN_ADVERTISE) - 1;