Klaus Demo nginx / 319dc27
allow directories in try_files Igor Sysoev 13 years ago
2 changed file(s) with 10 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
10371037 ssize_t reserve, allocated;
10381038 u_char *p, *name;
10391039 ngx_str_t path;
1040 ngx_uint_t test_dir;
10401041 ngx_http_try_file_t *tf;
10411042 ngx_open_file_info_t of;
10421043 ngx_http_script_code_pt code;
11311132 path.len -= alias;
11321133 }
11331134 }
1135
1136 test_dir = tf->test_dir;
11341137
11351138 tf++;
11361139
11711174 continue;
11721175 }
11731176
1174 if (!of.is_file) {
1177 if (of.is_dir && !test_dir) {
11751178 continue;
11761179 }
11771180
38523855
38533856 tf[i].name = value[i + 1];
38543857
3858 if (tf[i].name.data[tf[i].name.len - 1] == '/') {
3859 tf[i].test_dir = 1;
3860 tf[i].name.len--;
3861 }
3862
38553863 n = ngx_http_script_variables_count(&tf[i].name);
38563864
38573865 if (n) {
244244 ngx_array_t *lengths;
245245 ngx_array_t *values;
246246 ngx_str_t name;
247 ngx_uint_t test_dir; /* unsigned test_dir:1; */
247248 } ngx_http_try_file_t;
248249
249250