diff options
author | Roman Arutyunyan <arut@nginx.com> | 2021-05-18 18:17:25 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2021-05-18 18:17:25 +0300 |
commit | 66f736391ea5d0bc459c3f389a8cbfbb36fa9c86 (patch) | |
tree | 2180e183e07f131cafe7b69f4c5aafee40c754c6 /src | |
parent | a8c8b33144a8e46a87113ed5bd8acb4b9aef18eb (diff) | |
download | nginx-66f736391ea5d0bc459c3f389a8cbfbb36fa9c86.tar.gz nginx-66f736391ea5d0bc459c3f389a8cbfbb36fa9c86.zip |
HTTP/3: fixed server push after 9ec3e71f8a61.
When using server push, a segfault occured because
ngx_http_v3_create_push_request() accessed ngx_http_v3_session_t object the old
way. Prior to 9ec3e71f8a61, HTTP/3 session was stored directly in c->data.
Now it's referenced by the v3_session field of ngx_http_connection_t.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/v3/ngx_http_v3_filter_module.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/http/v3/ngx_http_v3_filter_module.c b/src/http/v3/ngx_http_v3_filter_module.c index ce0b478c2..93f3318cb 100644 --- a/src/http/v3/ngx_http_v3_filter_module.c +++ b/src/http/v3/ngx_http_v3_filter_module.c @@ -837,8 +837,7 @@ ngx_http_v3_create_push_request(ngx_http_request_t *pr, ngx_str_t *path, ngx_connection_t *c, *pc; ngx_http_request_t *r; ngx_http_log_ctx_t *ctx; - ngx_http_connection_t *hc; - ngx_http_v3_session_t *h3c; + ngx_http_connection_t *hc, *phc; ngx_http_core_srv_conf_t *cscf; pc = pr->connection; @@ -858,8 +857,8 @@ ngx_http_v3_create_push_request(ngx_http_request_t *pr, ngx_str_t *path, goto failed; } - h3c = ngx_http_v3_get_session(c); - ngx_memcpy(hc, h3c, sizeof(ngx_http_connection_t)); + phc = ngx_http_quic_get_connection(pc); + ngx_memcpy(hc, phc, sizeof(ngx_http_connection_t)); c->data = hc; ctx = ngx_palloc(c->pool, sizeof(ngx_http_log_ctx_t)); |