Mercurial > hg > nginx
comparison src/http/modules/ngx_http_index_handler.c @ 356:2e3cbc1bbe3c
nginx-0.0.7-2004-06-16-19:32:11 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 16 Jun 2004 15:32:11 +0000 |
parents | ec3c049681fd |
children | 6f3b20c1ac50 |
comparison
equal
deleted
inserted
replaced
355:0fb6c53fb135 | 356:2e3cbc1bbe3c |
---|---|
27 static ngx_int_t ngx_http_index_test_dir(ngx_http_request_t *r, | 27 static ngx_int_t ngx_http_index_test_dir(ngx_http_request_t *r, |
28 ngx_http_index_ctx_t *ctx); | 28 ngx_http_index_ctx_t *ctx); |
29 static ngx_int_t ngx_http_index_error(ngx_http_request_t *r, | 29 static ngx_int_t ngx_http_index_error(ngx_http_request_t *r, |
30 ngx_http_index_ctx_t *ctx, ngx_err_t err); | 30 ngx_http_index_ctx_t *ctx, ngx_err_t err); |
31 | 31 |
32 static int ngx_http_index_init(ngx_cycle_t *cycle); | 32 static ngx_int_t ngx_http_index_init(ngx_cycle_t *cycle); |
33 static void *ngx_http_index_create_loc_conf(ngx_conf_t *cf); | 33 static void *ngx_http_index_create_loc_conf(ngx_conf_t *cf); |
34 static char *ngx_http_index_merge_loc_conf(ngx_conf_t *cf, | 34 static char *ngx_http_index_merge_loc_conf(ngx_conf_t *cf, |
35 void *parent, void *child); | 35 void *parent, void *child); |
36 static char *ngx_http_index_set_index(ngx_conf_t *cf, ngx_command_t *cmd, | 36 static char *ngx_http_index_set_index(ngx_conf_t *cf, ngx_command_t *cmd, |
37 void *conf); | 37 void *conf); |
93 * Besides Win32 has ERROR_PATH_NOT_FOUND (NGX_ENOTDIR). | 93 * Besides Win32 has ERROR_PATH_NOT_FOUND (NGX_ENOTDIR). |
94 * Unix has ENOTDIR error, although it less helpfull - it shows only | 94 * Unix has ENOTDIR error, although it less helpfull - it shows only |
95 * that path contains the usual file in place of the directory. | 95 * that path contains the usual file in place of the directory. |
96 */ | 96 */ |
97 | 97 |
98 int ngx_http_index_handler(ngx_http_request_t *r) | 98 ngx_int_t ngx_http_index_handler(ngx_http_request_t *r) |
99 { | 99 { |
100 u_char *name; | 100 u_char *name; |
101 ngx_fd_t fd; | 101 ngx_fd_t fd; |
102 ngx_int_t rc; | 102 ngx_int_t rc; |
103 ngx_str_t *index; | 103 ngx_str_t *index; |
359 "\"%s\" is not found", ctx->path.data); | 359 "\"%s\" is not found", ctx->path.data); |
360 return NGX_HTTP_NOT_FOUND; | 360 return NGX_HTTP_NOT_FOUND; |
361 } | 361 } |
362 | 362 |
363 | 363 |
364 static int ngx_http_index_init(ngx_cycle_t *cycle) | 364 static ngx_int_t ngx_http_index_init(ngx_cycle_t *cycle) |
365 { | 365 { |
366 ngx_http_handler_pt *h; | 366 ngx_http_handler_pt *h; |
367 ngx_http_conf_ctx_t *ctx; | 367 ngx_http_conf_ctx_t *ctx; |
368 ngx_http_core_main_conf_t *cmcf; | 368 ngx_http_core_main_conf_t *cmcf; |
369 | 369 |