comparison src/http/modules/ngx_http_index_handler.c @ 113:d7f606e25b99

nginx-0.0.1-2003-07-04-19:10:33 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 04 Jul 2003 15:10:33 +0000
parents 152567c11325
children 5bf52498665c
comparison
equal deleted inserted replaced
112:da763a85be66 113:d7f606e25b99
12 12
13 #define NGX_HTTP_DEFAULT_INDEX "index.html" 13 #define NGX_HTTP_DEFAULT_INDEX "index.html"
14 14
15 15
16 static int ngx_http_index_test_dir(ngx_http_request_t *r); 16 static int ngx_http_index_test_dir(ngx_http_request_t *r);
17 static int ngx_http_index_init(ngx_cycle_t *cycle, ngx_log_t *log); 17 static int ngx_http_index_init(ngx_cycle_t *cycle);
18 static void *ngx_http_index_create_conf(ngx_pool_t *pool); 18 static void *ngx_http_index_create_conf(ngx_pool_t *pool);
19 static char *ngx_http_index_merge_conf(ngx_pool_t *p, void *parent, 19 static char *ngx_http_index_merge_conf(ngx_pool_t *p, void *parent,
20 void *child); 20 void *child);
21 static char *ngx_http_index_set_index(ngx_conf_t *cf, ngx_command_t *cmd, 21 static char *ngx_http_index_set_index(ngx_conf_t *cf, ngx_command_t *cmd,
22 void *conf); 22 void *conf);
51 NGX_MODULE, 51 NGX_MODULE,
52 &ngx_http_index_module_ctx, /* module context */ 52 &ngx_http_index_module_ctx, /* module context */
53 ngx_http_index_commands, /* module directives */ 53 ngx_http_index_commands, /* module directives */
54 NGX_HTTP_MODULE, /* module type */ 54 NGX_HTTP_MODULE, /* module type */
55 ngx_http_index_init, /* init module */ 55 ngx_http_index_init, /* init module */
56 NULL, /* commit module */ 56 NULL /* init child */
57 NULL /* rollback module */
58 }; 57 };
59 58
60 59
61 /* 60 /*
62 Try to open the first index file before the directory existence test 61 Try to open the first index file before the directory existence test
202 return NGX_HTTP_NOT_FOUND; 201 return NGX_HTTP_NOT_FOUND;
203 } 202 }
204 } 203 }
205 204
206 205
207 static int ngx_http_index_init(ngx_cycle_t *cycle, ngx_log_t *log) 206 static int ngx_http_index_init(ngx_cycle_t *cycle)
208 { 207 {
209 ngx_http_handler_pt *h; 208 ngx_http_handler_pt *h;
210 ngx_http_conf_ctx_t *ctx; 209 ngx_http_conf_ctx_t *ctx;
211 ngx_http_core_main_conf_t *cmcf; 210 ngx_http_core_main_conf_t *cmcf;
212 211