Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 8555:8b6486f0fe79 quic
QUIC: switch stream context to a server selected by SNI.
Previously the default server configuration context was used until the
:authority or host header was parsed. This led to using the configuration
parameters like client_header_buffer_size or request_pool_size from the default
server rather than from the server selected by SNI.
Also, the switch to the right server log is implemented. This issue manifested
itself as QUIC stream being logged to the default server log until :authority
or host is parsed.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 29 Sep 2020 22:09:09 +0100 |
parents | 2885cd81adb3 |
children | bed310672f39 |
comparison
equal
deleted
inserted
replaced
8554:2885cd81adb3 | 8555:8b6486f0fe79 |
---|---|
303 hc->conf_ctx = hc->addr_conf->default_server->ctx; | 303 hc->conf_ctx = hc->addr_conf->default_server->ctx; |
304 | 304 |
305 #if (NGX_HTTP_QUIC) | 305 #if (NGX_HTTP_QUIC) |
306 | 306 |
307 if (hc->addr_conf->quic) { | 307 if (hc->addr_conf->quic) { |
308 ngx_quic_conf_t *qcf; | 308 ngx_quic_conf_t *qcf; |
309 ngx_http_ssl_srv_conf_t *sscf; | 309 ngx_http_connection_t *phc; |
310 ngx_http_ssl_srv_conf_t *sscf; | |
311 ngx_http_core_loc_conf_t *clcf; | |
310 | 312 |
311 hc->ssl = 1; | 313 hc->ssl = 1; |
312 | 314 |
313 #if (NGX_HTTP_V3) | 315 #if (NGX_HTTP_V3) |
314 | 316 |
337 sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, | 339 sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, |
338 ngx_http_ssl_module); | 340 ngx_http_ssl_module); |
339 | 341 |
340 ngx_quic_run(c, &sscf->ssl, qcf); | 342 ngx_quic_run(c, &sscf->ssl, qcf); |
341 return; | 343 return; |
344 } | |
345 | |
346 phc = c->qs->parent->data; | |
347 | |
348 if (phc->ssl_servername) { | |
349 hc->ssl_servername = phc->ssl_servername; | |
350 hc->conf_ctx = phc->conf_ctx; | |
351 | |
352 clcf = ngx_http_get_module_loc_conf(hc->conf_ctx, | |
353 ngx_http_core_module); | |
354 ngx_set_connection_log(c, clcf->error_log); | |
342 } | 355 } |
343 } | 356 } |
344 | 357 |
345 #endif | 358 #endif |
346 | 359 |