comparison src/http/modules/ngx_http_index_handler.c @ 98:c9b243802a17

nginx-0.0.1-2003-05-30-18:27:59 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 30 May 2003 14:27:59 +0000
parents 70d2345a903f
children a059e1aa65d4
comparison
equal deleted inserted replaced
97:70d2345a903f 98:c9b243802a17
12 12
13 13
14 static ngx_command_t ngx_http_index_commands[] = { 14 static ngx_command_t ngx_http_index_commands[] = {
15 15
16 {ngx_string("index"), 16 {ngx_string("index"),
17 NGX_HTTP_LOC_CONF|NGX_CONF_ANY, 17 NGX_HTTP_LOC_CONF|NGX_CONF_ANY1,
18 ngx_http_index_set_index, 18 ngx_http_index_set_index,
19 NGX_HTTP_LOC_CONF_OFFSET, 19 NGX_HTTP_LOC_CONF_OFFSET,
20 0, 20 0,
21 NULL}, 21 NULL},
22 22
278 } 278 }
279 279
280 for (i = 1; i < cf->args->nelts; i++) { 280 for (i = 1; i < cf->args->nelts; i++) {
281 if (value[i].len == 0) { 281 if (value[i].len == 0) {
282 ngx_snprintf(ngx_conf_errstr, sizeof(ngx_conf_errstr) - 1, 282 ngx_snprintf(ngx_conf_errstr, sizeof(ngx_conf_errstr) - 1,
283 "index \"%s\" is invalid", value[1].data); 283 "index \"%s\" is invalid", value[i].data);
284 return ngx_conf_errstr; 284 return ngx_conf_errstr;
285 } 285 }
286 286
287 ngx_test_null(index, ngx_push_array(&icf->indices), NGX_CONF_ERROR); 287 ngx_test_null(index, ngx_push_array(&icf->indices), NGX_CONF_ERROR);
288 index->len = value[i].len; 288 index->len = value[i].len;