summaryrefslogtreecommitdiffhomepage
path: root/src/http/v3/ngx_http_v3_uni.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2022-10-19 17:45:30 +0400
committerRoman Arutyunyan <arut@nginx.com>2022-10-19 17:45:30 +0400
commitdd4c31fc34bd8390dd3fa9e804afc15b57b69135 (patch)
tree22cb03340b0d7fca5eeea21b4fccace82aaab1a2 /src/http/v3/ngx_http_v3_uni.c
parent21c34aadf9ff8c53f8b1413452895aa49d3fffa8 (diff)
downloadnginx-dd4c31fc34bd8390dd3fa9e804afc15b57b69135.tar.gz
nginx-dd4c31fc34bd8390dd3fa9e804afc15b57b69135.tar.bz2
HTTP/3: unified hq code with regular HTTP/3 code.
The change removes hq-specific request handler. Now hq requests are handled by the HTTP/3 request handler.
Diffstat (limited to 'src/http/v3/ngx_http_v3_uni.c')
-rw-r--r--src/http/v3/ngx_http_v3_uni.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/http/v3/ngx_http_v3_uni.c b/src/http/v3/ngx_http_v3_uni.c
index d6a6e97e6..d0e392de4 100644
--- a/src/http/v3/ngx_http_v3_uni.c
+++ b/src/http/v3/ngx_http_v3_uni.c
@@ -37,8 +37,23 @@ void
ngx_http_v3_init_uni_stream(ngx_connection_t *c)
{
uint64_t n;
+#if (NGX_HTTP_V3_HQ)
+ ngx_http_v3_session_t *h3c;
+#endif
ngx_http_v3_uni_stream_t *us;
+#if (NGX_HTTP_V3_HQ)
+ h3c = ngx_http_v3_get_session(c);
+ if (h3c->hq) {
+ ngx_http_v3_finalize_connection(c,
+ NGX_HTTP_V3_ERR_STREAM_CREATION_ERROR,
+ "uni stream in hq mode");
+ c->data = NULL;
+ ngx_http_v3_close_uni_stream(c);
+ return;
+ }
+#endif
+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 init uni stream");
n = c->quic->id >> 2;