comparison src/http/ngx_http_config.c @ 24:77c7629a2627

nginx-0.0.1-2002-12-10-21:05:12 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 10 Dec 2002 18:05:12 +0000
parents 4f3879d9b6f6
children 53cb81681040
comparison
equal deleted inserted replaced
23:f540a63026c9 24:77c7629a2627
98 } 98 }
99 99
100 ngx_http_index_set_stub(ngx_pool_t *pool, ngx_http_module_t **modules) 100 ngx_http_index_set_stub(ngx_pool_t *pool, ngx_http_module_t **modules)
101 { 101 {
102 int i; 102 int i;
103 ngx_str_t index;
103 ngx_command_t *cmd; 104 ngx_command_t *cmd;
104 105
105 for (i = 0; modules[i]; i++) { 106 for (i = 0; modules[i]; i++) {
106 if (modules[i] == &ngx_http_index_module) { 107 if (modules[i] == &ngx_http_index_module) {
107 for (cmd = modules[i]->commands; cmd->name; cmd++) { 108 for (cmd = modules[i]->commands; cmd->name; cmd++) {
108 if (strcmp(cmd->name, "index") == 0) { 109 if (strcmp(cmd->name, "index") == 0) {
109 cmd->set(pool, ngx_loc_conf[i], "index.html"); 110 index.len = sizeof("index.html") - 1;
111 index.data = "index.html";
112 cmd->set(pool, ngx_loc_conf[i], &index);
110 } 113 }
111 } 114 }
112 } 115 }
113 } 116 }
114 } 117 }