rename core_srv_conf fields to more understandable default_server and server
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 0d22166..6258380 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1220,7 +1220,7 @@
}
addr[i].opt = *lsopt;
- addr[i].core_srv_conf = cscf;
+ addr[i].default_server = cscf;
}
return NGX_OK;
@@ -1266,7 +1266,7 @@
addr->nregex = 0;
addr->regex = NULL;
#endif
- addr->core_srv_conf = cscf;
+ addr->default_server = cscf;
addr->servers.elts = NULL;
return ngx_http_add_server(cf, cscf, addr);
@@ -1325,7 +1325,7 @@
if (addr[a].servers.nelts > 1
#if (NGX_PCRE)
- || addr[a].core_srv_conf->captures
+ || addr[a].default_server->captures
#endif
)
{
@@ -1388,7 +1388,7 @@
}
#endif
- rc = ngx_hash_add_key(&ha, &name[n].name, name[n].core_srv_conf,
+ rc = ngx_hash_add_key(&ha, &name[n].name, name[n].server,
NGX_HASH_WILDCARD_KEY);
if (rc == NGX_ERROR) {
@@ -1636,7 +1636,7 @@
ls->handler = ngx_http_init_connection;
- cscf = addr->core_srv_conf;
+ cscf = addr->default_server;
ls->pool_size = cscf->connection_pool_size;
ls->post_accept_timeout = cscf->client_header_timeout;
@@ -1698,7 +1698,7 @@
sin = (struct sockaddr_in *) addr[i].opt.sockaddr;
addrs[i].addr = sin->sin_addr.s_addr;
- addrs[i].conf.core_srv_conf = addr[i].core_srv_conf;
+ addrs[i].conf.default_server = addr[i].default_server;
#if (NGX_HTTP_SSL)
addrs[i].conf.ssl = addr[i].opt.ssl;
#endif
@@ -1759,7 +1759,7 @@
sin6 = (struct sockaddr_in6 *) addr[i].opt.sockaddr;
addrs6[i].addr6 = sin6->sin6_addr;
- addrs6[i].conf.core_srv_conf = addr[i].core_srv_conf;
+ addrs6[i].conf.default_server = addr[i].default_server;
#if (NGX_HTTP_SSL)
addrs6[i].conf.ssl = addr[i].opt.ssl;
#endif
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 88d58e6..88d32e1 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2877,7 +2877,7 @@
#if (NGX_PCRE)
sn->regex = NULL;
#endif
- sn->core_srv_conf = conf;
+ sn->server = conf;
sn->name.len = conf->server_name.len;
sn->name.data = conf->server_name.data;
}
@@ -3529,7 +3529,7 @@
#if (NGX_PCRE)
sn->regex = NULL;
#endif
- sn->core_srv_conf = cscf;
+ sn->server = cscf;
sn->name = value[i];
ngx_strlow(sn->name.data, sn->name.data, sn->name.len);
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index 303bc9c..b83dbdd 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -177,7 +177,7 @@
typedef struct {
/* the default server configuration for this address:port */
- ngx_http_core_srv_conf_t *core_srv_conf;
+ ngx_http_core_srv_conf_t *default_server;
ngx_http_virtual_names_t *virtual_names;
@@ -230,7 +230,7 @@
#endif
/* the default server configuration for this address:port */
- ngx_http_core_srv_conf_t *core_srv_conf;
+ ngx_http_core_srv_conf_t *default_server;
ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */
} ngx_http_conf_addr_t;
@@ -239,7 +239,7 @@
#if (NGX_PCRE)
ngx_regex_t *regex;
#endif
- ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */
+ ngx_http_core_srv_conf_t *server; /* virtual name server conf */
ngx_str_t name;
};
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index a4041f5..3ae6ddb 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -381,7 +381,7 @@
r->virtual_names = addr_conf->virtual_names;
/* the default server configuration for the address:port */
- cscf = addr_conf->core_srv_conf;
+ cscf = addr_conf->default_server;
r->main_conf = cscf->ctx->main_conf;
r->srv_conf = cscf->ctx->srv_conf;
@@ -1704,7 +1704,7 @@
for (i = 0; i < r->virtual_names->nregex; i++) {
- if (sn[i].core_srv_conf->captures && r->captures == NULL) {
+ if (sn[i].server->captures && r->captures == NULL) {
ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3;
@@ -1730,7 +1730,7 @@
/* match */
- cscf = sn[i].core_srv_conf;
+ cscf = sn[i].server;
r->ncaptures = ncaptures;
r->captures_data = host;