comparison src/http/modules/ngx_http_index_handler.c @ 11:f323b4f74e4a

nginx-0.0.1-2002-09-12-18:42:29 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 12 Sep 2002 14:42:29 +0000
parents 4f3879d9b6f6
children 77c7629a2627
comparison
equal deleted inserted replaced
10:4f3879d9b6f6 11:f323b4f74e4a
107 if (prev->max_index_len != 0) 107 if (prev->max_index_len != 0)
108 return prev; 108 return prev;
109 109
110 ngx_test_null(index, ngx_push_array(conf->indices), NULL); 110 ngx_test_null(index, ngx_push_array(conf->indices), NULL);
111 index->name = NGX_HTTP_INDEX; 111 index->name = NGX_HTTP_INDEX;
112 conf->max_index_len = index->len = sizeof(NGX_HTTP_INDEX); 112 conf->max_index_len = index->len = sizeof(NGX_HTTP_INDEX) + 1;
113 } 113 }
114 114
115 return conf; 115 return conf;
116 } 116 }
117 117
120 ngx_http_index_conf_t *cf = (ngx_http_index_conf_t *) conf; 120 ngx_http_index_conf_t *cf = (ngx_http_index_conf_t *) conf;
121 ngx_http_index_file_t *index; 121 ngx_http_index_file_t *index;
122 122
123 ngx_test_null(index, ngx_push_array(cf->indices), NULL); 123 ngx_test_null(index, ngx_push_array(cf->indices), NULL);
124 index->name = value; 124 index->name = value;
125 index->len = strlen(value); 125 index->len = strlen(value) + 1;
126 126
127 if (cf->max_index_len < index->len) 127 if (cf->max_index_len < index->len)
128 cf->max_index_len = index->len; 128 cf->max_index_len = index->len;
129 129
130 return NULL; 130 return NULL;