diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2021-05-05 14:53:36 +0300 |
|---|---|---|
| committer | Roman Arutyunyan <arut@nginx.com> | 2021-05-05 14:53:36 +0300 |
| commit | 38773a3c1130d34715f1cce24527a10258447354 (patch) | |
| tree | 21ab82b33f79ae8a9a316eb62c7b8df418ec1877 /src/http/modules | |
| parent | 82f8734935ef28fbda4450fd88410b7d1f359c62 (diff) | |
| download | nginx-38773a3c1130d34715f1cce24527a10258447354.tar.gz nginx-38773a3c1130d34715f1cce24527a10258447354.tar.bz2 | |
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.
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_quic_module.c | 2 | ||||
| -rw-r--r-- | src/http/modules/ngx_http_quic_module.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_quic_module.c b/src/http/modules/ngx_http_quic_module.c index b7661b42c..2354dfd8b 100644 --- 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; diff --git a/src/http/modules/ngx_http_quic_module.h b/src/http/modules/ngx_http_quic_module.h index 21d4a40a1..8cadfbb87 100644 --- a/src/http/modules/ngx_http_quic_module.h +++ b/src/http/modules/ngx_http_quic_module.h @@ -18,6 +18,10 @@ #define NGX_HTTP_QUIC_ALPN_DRAFT_FMT "\x05hq-%02uD" +#define ngx_http_quic_get_connection(c) \ + ((ngx_http_connection_t *) (c)->quic->parent->data) + + ngx_int_t ngx_http_quic_init(ngx_connection_t *c); |
