diff src/http/ngx_http.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 fd84344f1df7
children dcff052728ea
line wrap: on
line diff
--- a/src/http/ngx_http.h
+++ b/src/http/ngx_http.h
@@ -27,11 +27,11 @@ typedef u_char *(*ngx_http_log_handler_p
 
 
 #include <ngx_http_variables.h>
+#include <ngx_http_config.h>
 #include <ngx_http_request.h>
 #include <ngx_http_script.h>
 #include <ngx_http_upstream.h>
 #include <ngx_http_upstream_round_robin.h>
-#include <ngx_http_config.h>
 #include <ngx_http_busy_lock.h>
 #include <ngx_http_core_module.h>