Mercurial > hg > nginx
comparison src/http/modules/ngx_http_index_handler.c @ 69:e43f406e4525
nginx-0.0.1-2003-03-20-19:09:44 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 20 Mar 2003 16:09:44 +0000 |
parents | e8cdc2989cee |
children | 59229033ae93 |
comparison
equal
deleted
inserted
replaced
68:d549fdc17d7e | 69:e43f406e4525 |
---|---|
33 {ngx_string(""), 0, NULL, 0, 0} | 33 {ngx_string(""), 0, NULL, 0, 0} |
34 }; | 34 }; |
35 | 35 |
36 | 36 |
37 ngx_http_module_t ngx_http_index_module_ctx = { | 37 ngx_http_module_t ngx_http_index_module_ctx = { |
38 NGX_HTTP_MODULE, | |
39 | |
40 NULL, /* create server config */ | 38 NULL, /* create server config */ |
41 NULL, /* init server config */ | 39 NULL, /* init server config */ |
40 | |
42 ngx_http_index_create_conf, /* create location config */ | 41 ngx_http_index_create_conf, /* create location config */ |
43 ngx_http_index_merge_conf, /* merge location config */ | 42 ngx_http_index_merge_conf, /* merge location config */ |
44 | 43 |
45 NULL, /* translate handler */ | 44 NULL /* init filters */ |
46 | |
47 NULL, /* output header filter */ | |
48 NULL, /* next output header filter */ | |
49 NULL, /* output body filter */ | |
50 NULL, /* next output body filter */ | |
51 | |
52 }; | 45 }; |
53 | 46 |
54 | 47 |
55 ngx_module_t ngx_http_index_module = { | 48 ngx_module_t ngx_http_index_module = { |
56 0, /* module index */ | 49 0, /* module index */ |
286 #endif | 279 #endif |
287 | 280 |
288 static char *ngx_http_index_set_index(ngx_conf_t *cf, ngx_command_t *cmd, | 281 static char *ngx_http_index_set_index(ngx_conf_t *cf, ngx_command_t *cmd, |
289 char *conf) | 282 char *conf) |
290 { | 283 { |
291 ngx_http_index_conf_t *icf = (ngx_http_index_conf_t *) conf; | 284 ngx_http_index_conf_t *lcf = (ngx_http_index_conf_t *) conf; |
292 int i; | 285 int i; |
293 ngx_str_t *index, *value; | 286 ngx_str_t *index, *value; |
294 | 287 |
295 value = (ngx_str_t *) cf->args->elts; | 288 value = (ngx_str_t *) cf->args->elts; |
296 for (i = 1; i < cf->args->nelts; i++) { | 289 for (i = 1; i < cf->args->nelts; i++) { |
297 ngx_test_null(index, ngx_push_array(icf->indices), NGX_CONF_ERROR); | 290 ngx_test_null(index, ngx_push_array(lcf->indices), NGX_CONF_ERROR); |
298 index->len = value[i].len; | 291 index->len = value[i].len; |
299 index->data = value[i].data; | 292 index->data = value[i].data; |
300 | 293 |
301 if (icf->max_index_len < index->len) { | 294 if (lcf->max_index_len < index->len) { |
302 icf->max_index_len = index->len; | 295 lcf->max_index_len = index->len; |
303 } | 296 } |
304 } | 297 } |
305 | 298 |
306 return NULL; | 299 return NULL; |
307 } | 300 } |