https://issues.apache.org/bugzilla/show_bug.cgi?id=56067
Bug ID: 56067
Summary: FallbackResource doesn't work if directory exists
Product: Apache httpd-2
Version: 2.4.7
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: mod_dir
Assignee: [email protected]
Reporter: [email protected]
Observe the following directory structure:
index.html
test/
bla.txt
And the following configuration:
DirectoryIndex disabled
DirectorySlash Off
FallbackResource /index.html
This all works fine (index.html is shown) if the document can't be mapped to
the file system; however, when `/test/` is requested, it will show a 404 page.
This is also disussed in the following question:
http://serverfault.com/questions/568952/use-fallbackresource-even-if-directory-exists
I've written a patch for this:
static int dir_fixups(request_rec *r)
{
if (r->finfo.filetype == APR_DIR) {
/* serve up a directory */
- return fixup_dir(r);
+ if (fixup_dir(r) == DECLINED) {
+ return fixup_dflt(r);
+ }
}
else if ((r->finfo.filetype == APR_NOFILE) && (r->handler == NULL)) {
/* No handler and nothing in the filesystem - use fallback */
return fixup_dflt(r);
}
return DECLINED;
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]