comparison 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
comparison
equal deleted inserted replaced
5088:ac31fcecb464 5089:903f2a5d86a5
25 typedef u_char *(*ngx_http_log_handler_pt)(ngx_http_request_t *r, 25 typedef u_char *(*ngx_http_log_handler_pt)(ngx_http_request_t *r,
26 ngx_http_request_t *sr, u_char *buf, size_t len); 26 ngx_http_request_t *sr, u_char *buf, size_t len);
27 27
28 28
29 #include <ngx_http_variables.h> 29 #include <ngx_http_variables.h>
30 #include <ngx_http_config.h>
30 #include <ngx_http_request.h> 31 #include <ngx_http_request.h>
31 #include <ngx_http_script.h> 32 #include <ngx_http_script.h>
32 #include <ngx_http_upstream.h> 33 #include <ngx_http_upstream.h>
33 #include <ngx_http_upstream_round_robin.h> 34 #include <ngx_http_upstream_round_robin.h>
34 #include <ngx_http_config.h>
35 #include <ngx_http_busy_lock.h> 35 #include <ngx_http_busy_lock.h>
36 #include <ngx_http_core_module.h> 36 #include <ngx_http_core_module.h>
37 37
38 #if (NGX_HTTP_CACHE) 38 #if (NGX_HTTP_CACHE)
39 #include <ngx_http_cache.h> 39 #include <ngx_http_cache.h>