Mercurial > hg > nginx-vendor-current
comparison src/http/modules/ngx_http_autoindex_module.c @ 248:acd2ec3541cb NGINX_0_4_9
nginx 0.4.9
*) Feature: the "set" parameter in the "include" SSI command.
*) Feature: the ngx_http_perl_module now tests the nginx.pm module
version.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Fri, 13 Oct 2006 00:00:00 +0400 |
parents | 38e7b94d63ac |
children | 2e9c57a5e50a |
comparison
equal
deleted
inserted
replaced
247:fcca101509a4 | 248:acd2ec3541cb |
---|---|
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; |