aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3_request.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2021-12-04 10:52:55 +0300
committerRoman Arutyunyan <arut@nginx.com>2021-12-04 10:52:55 +0300
commitd84c1f7885cc898f626057c314cdae4047c5d513 (patch)
treec351baac8bf82ebabbc2fae3a3da4320f657446e /src/http/v3/ngx_http_v3_request.c
parent731915a0c5e90b79d3cca1a4b0a3c33e1f77631c (diff)
downloadnginx-d84c1f7885cc898f626057c314cdae4047c5d513.tar.gz
nginx-d84c1f7885cc898f626057c314cdae4047c5d513.zip
HTTP/3: http3_hq directive and NGX_HTTP_V3_HQ macro.
Listen quic parameter is no longer supported.
Diffstat (limited to 'src/http/v3/ngx_http_v3_request.c')
-rw-r--r--src/http/v3/ngx_http_v3_request.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
index a4b570370..7fce688aa 100644
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -10,7 +10,9 @@
#include <ngx_http.h>
+#if (NGX_HTTP_V3_HQ)
static void ngx_http_v3_init_hq_stream(ngx_connection_t *c);
+#endif
static void ngx_http_v3_init_request_stream(ngx_connection_t *c);
static void ngx_http_v3_wait_request_handler(ngx_event_t *rev);
static void ngx_http_v3_cleanup_request(void *data);
@@ -64,11 +66,10 @@ ngx_http_v3_init(ngx_connection_t *c)
hc->ssl = 1;
- if (c->quic == NULL) {
- h3scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v3_module);
+ h3scf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_v3_module);
+ if (c->quic == NULL) {
ngx_quic_run(c, &h3scf->quic);
-
return;
}
@@ -82,10 +83,12 @@ ngx_http_v3_init(ngx_connection_t *c)
ngx_set_connection_log(c, clcf->error_log);
}
- if (!hc->addr_conf->http3) {
+#if (NGX_HTTP_V3_HQ)
+ if (h3scf->hq) {
ngx_http_v3_init_hq_stream(c);
return;
}
+#endif
if (ngx_http_v3_init_session(c) != NGX_OK) {
ngx_http_close_connection(c);
@@ -101,6 +104,8 @@ ngx_http_v3_init(ngx_connection_t *c)
}
+#if (NGX_HTTP_V3_HQ)
+
static void
ngx_http_v3_init_hq_stream(ngx_connection_t *c)
{
@@ -168,6 +173,8 @@ ngx_http_v3_init_hq_stream(ngx_connection_t *c)
}
}
+#endif
+
static void
ngx_http_v3_init_request_stream(ngx_connection_t *c)
@@ -387,16 +394,15 @@ ngx_http_v3_wait_request_handler(ngx_event_t *rev)
void
ngx_http_v3_reset_connection(ngx_connection_t *c)
{
- ngx_http_connection_t *hc;
ngx_http_v3_srv_conf_t *h3scf;
- hc = ngx_http_quic_get_connection(c);
+ h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module);
- if (!hc->addr_conf->http3) {
+#if (NGX_HTTP_V3_HQ)
+ if (h3scf->hq) {
return;
}
-
- h3scf = ngx_http_v3_get_module_srv_conf(c, ngx_http_v3_module);
+#endif
if (h3scf->max_table_capacity > 0 && !c->read->eof) {
(void) ngx_http_v3_send_cancel_stream(c, c->quic->id);