summaryrefslogtreecommitdiff
path: root/src/http/ngx_http.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-01-24 16:05:38 +0000
committerJonathan Kolb <jon@b0g.us>2006-01-24 16:05:38 +0000
commita0817999fd9cea702a0e13e65b27b500053071de (patch)
tree4a6707a34dff0fa6506400358f8ffdb912fc5411 /src/http/ngx_http.c
parent8367b3b547d2a0337d173c6461dad42eaae532db (diff)
downloadnginx-a0817999fd9cea702a0e13e65b27b500053071de.tar.gz
Changes with nginx 0.3.23 24 Jan 2006v0.3.23
*) Feature: the "optimize_host_names" directive. *) Bugfix: in using of the variables in the "path" and "alias" directives. *) Bugfix: the ngx_http_perl_module was incorrectly built on Linux and Solaris.
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r--src/http/ngx_http.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 72eacc861..61f9430fd 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -76,7 +76,7 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
char *rv;
u_char ch;
ngx_int_t rc;
- ngx_uint_t mi, m, s, l, p, a, n, i;
+ ngx_uint_t mi, m, s, l, p, a, i;
ngx_uint_t last, bind_all, done;
ngx_conf_t pcf;
ngx_array_t in_ports;
@@ -533,16 +533,20 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
/*
* check whether all name-based servers have the same configuraiton
- * as the default server, or some servers restrict the host names
+ * as the default server,
+ * or some servers restrict the host names,
+ * or some servers disable optimizing the host names
*/
in_addr = in_port[p].addrs.elts;
for (a = 0; a < in_port[p].addrs.nelts; a++) {
name = in_addr[a].names.elts;
- for (n = 0; n < in_addr[a].names.nelts; n++) {
- if (in_addr[a].core_srv_conf != name[n].core_srv_conf
- || name[n].core_srv_conf->restrict_host_names
+ for (s = 0; s < in_addr[a].names.nelts; s++) {
+
+ if (in_addr[a].core_srv_conf != name[s].core_srv_conf
+ || name[s].core_srv_conf->optimize_host_names == 0
+ || name[s].core_srv_conf->restrict_host_names
!= NGX_HTTP_RESTRICT_HOST_OFF)
{
goto virtual_names;
@@ -551,7 +555,9 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
/*
* if all name-based servers have the same configuration
- * as the default server, and no servers restrict the host names
+ * as the default server,
+ * and no servers restrict the host names,
+ * and no servers disable optimizing the host names
* then we do not need to check them at run-time at all
*/