Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 1157:a4820184a618
*) 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
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 02 Apr 2007 06:27:30 +0000 |
parents | a9005d2e2c99 |
children | 6e2216ad2c87 |
comparison
equal
deleted
inserted
replaced
1156:a9005d2e2c99 | 1157:a4820184a618 |
---|---|
2612 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 2612 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
2613 "server name \"%V\" is invalid", &value[i]); | 2613 "server name \"%V\" is invalid", &value[i]); |
2614 return NGX_CONF_ERROR; | 2614 return NGX_CONF_ERROR; |
2615 } | 2615 } |
2616 | 2616 |
2617 if (ngx_strchr(value[i].data, '/')) { | |
2618 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, | |
2619 "server name \"%V\" has strange symbols", | |
2620 &value[i]); | |
2621 } | |
2622 | |
2617 sn = ngx_array_push(&cscf->server_names); | 2623 sn = ngx_array_push(&cscf->server_names); |
2618 if (sn == NULL) { | 2624 if (sn == NULL) { |
2619 return NGX_CONF_ERROR; | 2625 return NGX_CONF_ERROR; |
2620 } | 2626 } |
2621 | 2627 |