Mercurial > hg > nginx
comparison src/http/modules/ngx_http_autoindex_module.c @ 773:c3ebeee31026
remove r->root_length
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 12 Oct 2006 13:36:54 +0000 |
parents | 7e24168b0853 |
children | d8e2613a2b55 |
comparison
equal
deleted
inserted
replaced
772:843412b22ba2 | 773:c3ebeee31026 |
---|---|
133 static ngx_int_t | 133 static ngx_int_t |
134 ngx_http_autoindex_handler(ngx_http_request_t *r) | 134 ngx_http_autoindex_handler(ngx_http_request_t *r) |
135 { | 135 { |
136 u_char *last, *filename, scale; | 136 u_char *last, *filename, scale; |
137 off_t length; | 137 off_t length; |
138 size_t len, copy, allocated; | 138 size_t len, copy, allocated, root; |
139 ngx_tm_t tm; | 139 ngx_tm_t tm; |
140 ngx_err_t err; | 140 ngx_err_t err; |
141 ngx_buf_t *b; | 141 ngx_buf_t *b; |
142 ngx_int_t rc, size; | 142 ngx_int_t rc, size; |
143 ngx_str_t path; | 143 ngx_str_t path; |
172 return NGX_DECLINED; | 172 return NGX_DECLINED; |
173 } | 173 } |
174 | 174 |
175 /* NGX_DIR_MASK_LEN is lesser than NGX_HTTP_AUTOINDEX_PREALLOCATE */ | 175 /* NGX_DIR_MASK_LEN is lesser than NGX_HTTP_AUTOINDEX_PREALLOCATE */ |
176 | 176 |
177 last = ngx_http_map_uri_to_path(r, &path, NGX_HTTP_AUTOINDEX_PREALLOCATE); | 177 last = ngx_http_map_uri_to_path(r, &path, &root, |
178 NGX_HTTP_AUTOINDEX_PREALLOCATE); | |
178 if (last == NULL) { | 179 if (last == NULL) { |
179 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 180 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
180 } | 181 } |
181 | 182 |
182 allocated = path.len; | 183 allocated = path.len; |