diff src/http/modules/ngx_http_quic_module.c @ 8769:9ec3e71f8a61 quic

HTTP/3: reference h3c directly from ngx_http_connection_t. Previously, an ngx_http_v3_connection_t object was created for HTTP/3 and then assinged to c->data instead of the generic ngx_http_connection_t object. Now a direct reference is added to ngx_http_connection_t, which is less confusing and does not require a flag for http3.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 05 May 2021 14:53:36 +0300
parents b4e6b7049984
children f8ad3dd142ad
line wrap: on
line diff
--- a/src/http/modules/ngx_http_quic_module.c
+++ b/src/http/modules/ngx_http_quic_module.c
@@ -201,7 +201,7 @@ ngx_http_quic_init(ngx_connection_t *c)
 
     ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http init quic stream");
 
-    phc = c->quic->parent->data;
+    phc = ngx_http_quic_get_connection(c);
 
     if (phc->ssl_servername) {
         hc->ssl_servername = phc->ssl_servername;