Mercurial > hg > nginx
comparison src/http/modules/ngx_http_index_handler.c @ 118:5bf52498665c
nginx-0.0.1-2003-07-18-18:44:05 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 18 Jul 2003 14:44:05 +0000 |
parents | d7f606e25b99 |
children | cd54bcbaf3b5 |
comparison
equal
deleted
inserted
replaced
117:f6e3c5d019b6 | 118:5bf52498665c |
---|---|
288 ngx_str_t *index, *value; | 288 ngx_str_t *index, *value; |
289 | 289 |
290 value = cf->args->elts; | 290 value = cf->args->elts; |
291 | 291 |
292 if (value[1].data[0] == '/' && icf->indices.nelts == 0) { | 292 if (value[1].data[0] == '/' && icf->indices.nelts == 0) { |
293 ngx_snprintf(ngx_conf_errstr, sizeof(ngx_conf_errstr) - 1, | 293 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
294 "first index \"%s\" must not be absolute", value[1].data); | 294 "first index \"%s\" in \"%s\" directive " |
295 return ngx_conf_errstr; | 295 "must not be absolute", |
296 value[1].data, cmd->name.data); | |
297 return NGX_CONF_ERROR; | |
296 } | 298 } |
297 | 299 |
298 for (i = 1; i < cf->args->nelts; i++) { | 300 for (i = 1; i < cf->args->nelts; i++) { |
299 if (value[i].len == 0) { | 301 if (value[i].len == 0) { |
300 ngx_snprintf(ngx_conf_errstr, sizeof(ngx_conf_errstr) - 1, | 302 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
301 "index \"%s\" is invalid", value[i].data); | 303 "index \"%s\" in \"%s\" directive is invalid", |
302 return ngx_conf_errstr; | 304 value[1].data, cmd->name.data); |
305 return NGX_CONF_ERROR; | |
303 } | 306 } |
304 | 307 |
305 ngx_test_null(index, ngx_push_array(&icf->indices), NGX_CONF_ERROR); | 308 ngx_test_null(index, ngx_push_array(&icf->indices), NGX_CONF_ERROR); |
306 index->len = value[i].len; | 309 index->len = value[i].len; |
307 index->data = value[i].data; | 310 index->data = value[i].data; |