comparison src/http/ngx_http_request.h @ 5089:903f2a5d86a5

SNI: reuse selected configuration for all requests in a connection. Previously, only the first request in a connection was assigned the configuration selected by SNI. All subsequent requests initially used the default server's configuration, ignoring SNI, which was wrong. Now all subsequent requests in a connection will initially use the configuration selected by SNI. This is done by storing a pointer to configuration in http connection object. It points to default server's configuration initially, but changed upon receipt of SNI. (The request's configuration can be further refined when parsing the request line and Host: header.) This change was not made specific to SNI as it also allows slightly faster access to configuration without the request object.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 27 Feb 2013 17:12:48 +0000
parents 1b204b8ea9a3
children d3e256c67d6d
comparison
equal deleted inserted replaced
5088:ac31fcecb464 5089:903f2a5d86a5
291 291
292 typedef struct ngx_http_addr_conf_s ngx_http_addr_conf_t; 292 typedef struct ngx_http_addr_conf_s ngx_http_addr_conf_t;
293 293
294 typedef struct { 294 typedef struct {
295 ngx_http_addr_conf_t *addr_conf; 295 ngx_http_addr_conf_t *addr_conf;
296 ngx_http_conf_ctx_t *conf_ctx;
296 297
297 ngx_http_request_t *request; 298 ngx_http_request_t *request;
298 299
299 ngx_buf_t **busy; 300 ngx_buf_t **busy;
300 ngx_int_t nbusy; 301 ngx_int_t nbusy;