aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_string.h1
-rw-r--r--src/http/ngx_http_core_module.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h
index 15650009c..db7857a36 100644
--- a/src/core/ngx_string.h
+++ b/src/core/ngx_string.h
@@ -40,6 +40,7 @@ typedef struct {
#define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2)
+#define ngx_strchr(s1, c) strchr((const char *) s1, (int) c)
#define ngx_strlen(s) strlen((const char *) s)
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;