aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_index_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2002-09-12 14:42:29 +0000
committerIgor Sysoev <igor@sysoev.ru>2002-09-12 14:42:29 +0000
commit3a40d48164f13be2ddfc2ed84e593edc40d12a1c (patch)
tree591342422899073c8e16cf0bb72a64a2d840935c /src/http/modules/ngx_http_index_handler.c
parente0268b95c6dea75f88d3874213b1aa0cd0aba692 (diff)
downloadnginx-3a40d48164f13be2ddfc2ed84e593edc40d12a1c.tar.gz
nginx-3a40d48164f13be2ddfc2ed84e593edc40d12a1c.zip
nginx-0.0.1-2002-09-12-18:42:29 import
Diffstat (limited to 'src/http/modules/ngx_http_index_handler.c')
-rw-r--r--src/http/modules/ngx_http_index_handler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c
index a356ac1a6..6877b3341 100644
--- a/src/http/modules/ngx_http_index_handler.c
+++ b/src/http/modules/ngx_http_index_handler.c
@@ -109,7 +109,7 @@ static void *ngx_http_index_merge_conf(ngx_pool_t *p, void *parent, void *child)
ngx_test_null(index, ngx_push_array(conf->indices), NULL);
index->name = NGX_HTTP_INDEX;
- conf->max_index_len = index->len = sizeof(NGX_HTTP_INDEX);
+ conf->max_index_len = index->len = sizeof(NGX_HTTP_INDEX) + 1;
}
return conf;
@@ -122,7 +122,7 @@ static char *ngx_http_index_set_index(ngx_pool_t *p, void *conf, char *value)
ngx_test_null(index, ngx_push_array(cf->indices), NULL);
index->name = value;
- index->len = strlen(value);
+ index->len = strlen(value) + 1;
if (cf->max_index_len < index->len)
cf->max_index_len = index->len;