ssize_t reserve, allocated;
u_char *p, *name;
ngx_str_t path;
+ ngx_uint_t test_dir;
ngx_http_try_file_t *tf;
ngx_open_file_info_t of;
ngx_http_script_code_pt code;
}
}
+ test_dir = tf->test_dir;
+
tf++;
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
continue;
}
- if (!of.is_file) {
+ if (of.is_dir && !test_dir) {
continue;
}
tf[i].name = value[i + 1];
+ if (tf[i].name.data[tf[i].name.len - 1] == '/') {
+ tf[i].test_dir = 1;
+ tf[i].name.len--;
+ }
+
n = ngx_http_script_variables_count(&tf[i].name);
if (n) {