unsigned int allow_encoded_slashes_set : 1;
unsigned int decode_encoded_slashes_set : 1;
+ unsigned int d_is_directory : 1;
/** Named back references */
apr_array_header_t *refs;
conf->r = r;
conf->d = cmd->path;
conf->d_is_fnmatch = (apr_fnmatch_test(conf->d) != 0);
+ conf->d_is_directory = 1;
if (r) {
conf->refs = apr_array_make(cmd->pool, 8, sizeof(char *));
pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
}
+ /* core_dir_config is Directory*, but the requested file is
+ * not a directory, so although the regexp could match,
+ * we skip it. */
+ if (entry_core->d_is_directory && r->finfo.filetype != APR_DIR) {
+ continue;
+ }
+
if (ap_regexec(entry_core->r, r->filename, nmatch, pmatch, 0)) {
continue;
}