aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-04-02 06:27:30 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-04-02 06:27:30 +0000
commit7a5886052f061e4ad5edbd20e1dac6118cc3cdab (patch)
tree72a46e5c4268929dd4c8ccf1211e3adf2a8f87e9 /src/http/ngx_http_core_module.c
parent10b9894beeac2fc9d88283ad1140be3b8cf4543d (diff)
downloadnginx-7a5886052f061e4ad5edbd20e1dac6118cc3cdab.tar.gz
nginx-7a5886052f061e4ad5edbd20e1dac6118cc3cdab.zip
*) introduce ngx_strchr()
*) test server_name for '/': it's common configuration error when trailing ';' is omitted and a next directive is treated as server_name
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 49eed1b03..7fa0ba347 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2614,6 +2614,12 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NGX_CONF_ERROR;
}
+ if (ngx_strchr(value[i].data, '/')) {
+ ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+ "server name \"%V\" has strange symbols",
+ &value[i]);
+ }
+
sn = ngx_array_push(&cscf->server_names);
if (sn == NULL) {
return NGX_CONF_ERROR;