Klaus Demo nginx / 7a58860
*) 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 Igor Sysoev 15 years ago
2 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3939
4040
4141 #define ngx_strstr(s1, s2) strstr((const char *) s1, (const char *) s2)
42 #define ngx_strchr(s1, c) strchr((const char *) s1, (int) c)
4243 #define ngx_strlen(s) strlen((const char *) s)
4344
4445
26132613 return NGX_CONF_ERROR;
26142614 }
26152615
2616 if (ngx_strchr(value[i].data, '/')) {
2617 ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
2618 "server name \"%V\" has strange symbols",
2619 &value[i]);
2620 }
2621
26162622 sn = ngx_array_push(&cscf->server_names);
26172623 if (sn == NULL) {
26182624 return NGX_CONF_ERROR;