]> granicus.if.org Git - apache/commitdiff
If a directory exists but no indexes can be resolved, the fallback resource
authorEric Covener <covener@apache.org>
Tue, 21 Apr 2015 12:23:33 +0000 (12:23 +0000)
committerEric Covener <covener@apache.org>
Tue, 21 Apr 2015 12:23:33 +0000 (12:23 +0000)
should be attempted first before giving up.

Submitted By: Jack <tjerk.meesters gmail.com> , covener
Committed By: covener

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1675103 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/mappers/mod_dir.c

diff --git a/CHANGES b/CHANGES
index 20715c13abb549466902e8d889c9a94f4de4a4bb..2597f0fe84bf523dec49be8ce3d9a79ce67d4f49 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) Allow FallbackResource to work when a directory is requested and
+     there is no autoindex nor DirectoryIndex. 
+     [Jack <tjerk.meesters gmail.com>, Eric Covener]
+
   *) mod_proxy_wstunnel: Bypass the handler while the connection is not
      upgraded to WebSocket, so that other modules can possibly take over
      the leading HTTP requests.  [Yann Ylavic]
index d2d075d98b3db26746ef668168a76f9dff255562..93533850c2a16eaef71ad05df67f14637e8fdf78 100644 (file)
@@ -387,8 +387,15 @@ static int fixup_dir(request_rec *r)
 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) == OK) {
+            return OK;
+        }
+        /* we're running between mod_rewrites fixup and its internal redirect handler, step aside */
+        if (!strcmp(r->handler, REWRITE_REDIRECT_HANDLER_NAME)) {
+            return DECLINED;
+        }
+
+        return fixup_dflt(r);
     }
     else if ((r->finfo.filetype == APR_NOFILE) && (r->handler == NULL)) {
         /* No handler and nothing in the filesystem - use fallback */