diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-01-24 16:08:27 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-01-24 16:08:27 +0000 |
commit | 34303468409089ef2b5bd9739b9c049c393932e4 (patch) | |
tree | 1e47f167cd74beaeca64d863662ed1e82d2cf822 /src/http/ngx_http.c | |
parent | d94e18746b9e79fbb52cf3012d1692ad893df22e (diff) | |
download | nginx-release-0.3.23.tar.gz nginx-release-0.3.23.zip |
nginx-0.3.23-RELEASE importrelease-0.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.c | 18 |
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 */ |