summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_core_module.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-10-21 16:27:48 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-10-21 16:27:48 +0000
commit2a634f53421af2fb09dcd9f3b0641723eb0370a6 (patch)
tree89f849e7e144623d9598564223bf4c7db704c2de /src/http/ngx_http_core_module.h
parentd2d0931ed5a40d63bc6d9593c06604cb5e0eeca6 (diff)
downloadnginx-2a634f53421af2fb09dcd9f3b0641723eb0370a6.tar.gz
nginx-2a634f53421af2fb09dcd9f3b0641723eb0370a6.tar.bz2
fix r3218:
Initially building lists of ports, addresses, and server names had been placed at final configuration stage, because complete set of the "listen"s and the "server_names" were required for this operation. r3218 broke it, because the "listen"s go usually first in configuration, and cscf->server_names is empty at this stage, therefore no virtual names were configured. Now server configurations are stored in array for each address:port to configure virtual names. Also regex captures flag is moved from server names to core server configuration.
Diffstat (limited to 'src/http/ngx_http_core_module.h')
-rw-r--r--src/http/ngx_http_core_module.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index e38602263..ef93a34aa 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -168,7 +168,10 @@ typedef struct {
ngx_flag_t merge_slashes;
ngx_flag_t underscores_in_headers;
- ngx_uint_t listen; /* unsigned listen:1; */
+ unsigned listen:1;
+#if (NGX_PCRE)
+ unsigned captures:1;
+#endif
ngx_http_core_loc_conf_t **named_locations;
} ngx_http_core_srv_conf_t;
@@ -227,8 +230,6 @@ typedef struct {
ngx_hash_wildcard_t *wc_head;
ngx_hash_wildcard_t *wc_tail;
- ngx_array_t names; /* array of ngx_http_server_name_t */
-
#if (NGX_PCRE)
ngx_uint_t nregex;
ngx_http_server_name_t *regex;
@@ -236,6 +237,7 @@ typedef struct {
/* the default server configuration for this address:port */
ngx_http_core_srv_conf_t *core_srv_conf;
+ ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */
ngx_http_listen_opt_t opt;
} ngx_http_conf_addr_t;
@@ -244,7 +246,6 @@ typedef struct {
struct ngx_http_server_name_s {
#if (NGX_PCRE)
ngx_regex_t *regex;
- ngx_uint_t captures; /* unsigned captures:1; */
#endif
ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */
ngx_str_t name;