comparison src/http/modules/ngx_http_quic_module.c @ 8679:e1eb7f4ca9f1 quic

HTTP/3: refactored request parser. The change reduces diff to the default branch for src/http/ngx_http_request.c and src/http/ngx_http_parse.c.
author Roman Arutyunyan <arut@nginx.com>
date Fri, 22 Jan 2021 16:34:06 +0300
parents 831d1960826f
children dffb66fb783b
comparison
equal deleted inserted replaced
8678:3443ee341cc1 8679:e1eb7f4ca9f1
173 173
174 ngx_http_null_variable 174 ngx_http_null_variable
175 }; 175 };
176 176
177 177
178 ngx_int_t
179 ngx_http_quic_init(ngx_connection_t *c)
180 {
181 ngx_quic_conf_t *qcf;
182 ngx_http_connection_t *hc, *phc;
183 ngx_http_core_loc_conf_t *clcf;
184
185 hc = c->data;
186
187 hc->ssl = 1;
188
189 if (c->quic == NULL) {
190 c->log->connection = c->number;
191
192 qcf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_quic_module);
193
194 ngx_quic_run(c, qcf);
195
196 return NGX_DONE;
197 }
198
199 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http init quic stream");
200
201 phc = c->quic->parent->data;
202
203 if (phc->ssl_servername) {
204 hc->ssl_servername = phc->ssl_servername;
205 hc->conf_ctx = phc->conf_ctx;
206
207 clcf = ngx_http_get_module_loc_conf(hc->conf_ctx, ngx_http_core_module);
208 ngx_set_connection_log(c, clcf->error_log);
209 }
210
211 return NGX_OK;
212 }
213
214
178 static ngx_int_t 215 static ngx_int_t
179 ngx_http_variable_quic(ngx_http_request_t *r, 216 ngx_http_variable_quic(ngx_http_request_t *r,
180 ngx_http_variable_value_t *v, uintptr_t data) 217 ngx_http_variable_value_t *v, uintptr_t data)
181 { 218 {
182 if (r->connection->quic) { 219 if (r->connection->quic) {