Welcome! Log In Create A New Profile

Advanced

[PATCH] HTTP/3: removed "http3" parameter of "listen" directive

Roman Arutyunyan
May 11, 2023 05:24AM
# HG changeset patch
# User Roman Arutyunyan <arut@nginx.com>
# Date 1683796930 -14400
# Thu May 11 13:22:10 2023 +0400
# Branch quic
# Node ID f721a6689bd0a7278f362e67f323a5087919c0ac
# Parent 0d89203a863a34227d3c9e0ddcf07a670c0e78fc
HTTP/3: removed "http3" parameter of "listen" directive.

The parameter has been deprecated since c851a2ed5ce8.

diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c
--- a/src/http/modules/ngx_http_ssl_module.c
+++ b/src/http/modules/ngx_http_ssl_module.c
@@ -477,7 +477,7 @@ ngx_http_ssl_alpn_select(ngx_ssl_conn_t
srv = (unsigned char *) NGX_HTTP_V3_HQ_ALPN_PROTO;
srvlen = sizeof(NGX_HTTP_V3_HQ_ALPN_PROTO) - 1;

- } else if (h3scf->enable || hc->addr_conf->http3) {
+ } else if (h3scf->enable) {
srv = (unsigned char *) NGX_HTTP_V3_ALPN_PROTO;
srvlen = sizeof(NGX_HTTP_V3_ALPN_PROTO) - 1;

diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1242,7 +1242,6 @@ ngx_http_add_addresses(ngx_conf_t *cf, n
ngx_uint_t http2;
#endif
#if (NGX_HTTP_V3)
- ngx_uint_t http3;
ngx_uint_t quic;
#endif

@@ -1287,7 +1286,6 @@ ngx_http_add_addresses(ngx_conf_t *cf, n
protocols_prev |= addr[i].opt.http2 << 2;
#endif
#if (NGX_HTTP_V3)
- http3 = lsopt->http3 || addr[i].opt.http3;
quic = lsopt->quic || addr[i].opt.quic;
#endif

@@ -1378,7 +1376,6 @@ ngx_http_add_addresses(ngx_conf_t *cf, n
addr[i].opt.http2 = http2;
#endif
#if (NGX_HTTP_V3)
- addr[i].opt.http3 = http3;
addr[i].opt.quic = quic;
#endif

@@ -1929,7 +1926,6 @@ ngx_http_add_addrs(ngx_conf_t *cf, ngx_h
addrs[i].conf.http2 = addr[i].opt.http2;
#endif
#if (NGX_HTTP_V3)
- addrs[i].conf.http3 = addr[i].opt.http3;
addrs[i].conf.quic = addr[i].opt.quic;
#endif
addrs[i].conf.proxy_protocol = addr[i].opt.proxy_protocol;
@@ -1998,7 +1994,6 @@ ngx_http_add_addrs6(ngx_conf_t *cf, ngx_
addrs6[i].conf.http2 = addr[i].opt.http2;
#endif
#if (NGX_HTTP_V3)
- addrs6[i].conf.http3 = addr[i].opt.http3;
addrs6[i].conf.quic = addr[i].opt.quic;
#endif
addrs6[i].conf.proxy_protocol = addr[i].opt.proxy_protocol;
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -4186,23 +4186,6 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx
#endif
}

- if (ngx_strcmp(value[n].data, "http3") == 0) {
-#if (NGX_HTTP_V3)
- ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
- "the \"http3\" parameter is deprecated, "
- "use \"quic\" parameter instead");
- lsopt.quic = 1;
- lsopt.http3 = 1;
- lsopt.type = SOCK_DGRAM;
- continue;
-#else
- ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "the \"http3\" parameter requires "
- "ngx_http_v3_module");
- return NGX_CONF_ERROR;
-#endif
- }
-
if (ngx_strcmp(value[n].data, "quic") == 0) {
#if (NGX_HTTP_V3)
lsopt.quic = 1;
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -75,7 +75,6 @@ typedef struct {
unsigned wildcard:1;
unsigned ssl:1;
unsigned http2:1;
- unsigned http3:1;
unsigned quic:1;
#if (NGX_HAVE_INET6)
unsigned ipv6only:1;
@@ -240,7 +239,6 @@ struct ngx_http_addr_conf_s {

unsigned ssl:1;
unsigned http2:1;
- unsigned http3:1;
unsigned quic:1;
unsigned proxy_protocol:1;
};
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -1014,14 +1014,12 @@ ngx_http_v3_process_request_header(ngx_h
h3c = ngx_http_v3_get_session(c);
h3scf = ngx_http_get_module_srv_conf(r, ngx_http_v3_module);

- if (!r->http_connection->addr_conf->http3) {
- if ((h3c->hq && !h3scf->enable_hq) || (!h3c->hq && !h3scf->enable)) {
- ngx_log_error(NGX_LOG_INFO, c->log, 0,
- "client attempted to request the server name "
- "for which the negotiated protocol is disabled");
- ngx_http_finalize_request(r, NGX_HTTP_MISDIRECTED_REQUEST);
- return NGX_ERROR;
- }
+ if ((h3c->hq && !h3scf->enable_hq) || (!h3c->hq && !h3scf->enable)) {
+ ngx_log_error(NGX_LOG_INFO, c->log, 0,
+ "client attempted to request the server name "
+ "for which the negotiated protocol is disabled");
+ ngx_http_finalize_request(r, NGX_HTTP_MISDIRECTED_REQUEST);
+ return NGX_ERROR;
}

if (ngx_http_v3_construct_cookie_header(r) != NGX_OK) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] HTTP/3: removed "http3" parameter of "listen" directive

Roman Arutyunyan 328 May 11, 2023 05:24AM

Re: [PATCH] HTTP/3: removed "http3" parameter of "listen" directive

Maxim Dounin 120 May 12, 2023 09:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 166
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready