Mercurial > hg > nginx
changeset 9082:f4279edda9fd quic
HTTP/3: trigger more compatibility errors for "listen quic".
Now "ssl", "proxy_protocol" and "http2" are not allowed with "quic" in "listen"
directive. Previously, only "ssl" was not allowed.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 26 Jan 2023 15:25:33 +0400 |
parents | c851a2ed5ce8 |
children | 5fd628b89bb7 |
files | src/http/ngx_http_core_module.c |
diffstat | 1 files changed, 20 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c Mon Feb 27 14:00:56 2023 +0400 +++ b/src/http/ngx_http_core_module.c Thu Jan 26 15:25:33 2023 +0400 @@ -4320,10 +4320,26 @@ return NGX_CONF_ERROR; } -#if (NGX_HTTP_SSL && NGX_HTTP_V3) - if (lsopt.ssl && lsopt.quic) { - return "\"ssl\" parameter is incompatible with \"quic\""; - } +#if (NGX_HTTP_V3) + + if (lsopt.quic) { +#if (NGX_HTTP_SSL) + if (lsopt.ssl) { + return "\"ssl\" parameter is incompatible with \"quic\""; + } +#endif + +#if (NGX_HTTP_V2) + if (lsopt.http2) { + return "\"http2\" parameter is incompatible with \"quic\""; + } +#endif + + if (lsopt.proxy_protocol) { + return "\"proxy_protocol\" parameter is incompatible with \"quic\""; + } + } + #endif for (n = 0; n < u.naddrs; n++) {