Mercurial > hg > nginx-mail
comparison src/http/modules/ngx_http_random_index_module.c @ 665:0b460e61bdcd default tip
Merge with nginx 1.0.0.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 25 Apr 2011 04:22:17 +0400 |
parents | ff463db0be31 |
children |
comparison
equal
deleted
inserted
replaced
572:06419a2298a9 | 665:0b460e61bdcd |
---|---|
84 | 84 |
85 if (r->uri.data[r->uri.len - 1] != '/') { | 85 if (r->uri.data[r->uri.len - 1] != '/') { |
86 return NGX_DECLINED; | 86 return NGX_DECLINED; |
87 } | 87 } |
88 | 88 |
89 if (r->zero_in_uri) { | |
90 return NGX_DECLINED; | |
91 } | |
92 | |
93 if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD|NGX_HTTP_POST))) { | 89 if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD|NGX_HTTP_POST))) { |
94 return NGX_DECLINED; | 90 return NGX_DECLINED; |
95 } | 91 } |
96 | 92 |
97 rlcf = ngx_http_get_module_loc_conf(r, ngx_http_random_index_module); | 93 rlcf = ngx_http_get_module_loc_conf(r, ngx_http_random_index_module); |
173 continue; | 169 continue; |
174 } | 170 } |
175 | 171 |
176 len = ngx_de_namelen(&dir); | 172 len = ngx_de_namelen(&dir); |
177 | 173 |
178 if (!dir.valid_type) { | 174 if (dir.type == 0 || ngx_de_is_link(&dir)) { |
179 | 175 |
180 /* 1 byte for '/' and 1 byte for terminating '\0' */ | 176 /* 1 byte for '/' and 1 byte for terminating '\0' */ |
181 | 177 |
182 if (path.len + 1 + len + 1 > allocated) { | 178 if (path.len + 1 + len + 1 > allocated) { |
183 allocated = path.len + 1 + len + 1 | 179 allocated = path.len + 1 + len + 1 |