diff 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
line wrap: on
line diff
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -293,6 +293,7 @@ typedef struct ngx_http_addr_conf_s  ngx
 
 typedef struct {
     ngx_http_addr_conf_t             *addr_conf;
+    ngx_http_conf_ctx_t              *conf_ctx;
 
     ngx_http_request_t               *request;