]> granicus.if.org Git - apache/commitdiff
Merge r1675103 from trunk:
authorJim Jagielski <jim@apache.org>
Fri, 1 May 2015 17:02:08 +0000 (17:02 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 1 May 2015 17:02:08 +0000 (17:02 +0000)
If a directory exists but no indexes can be resolved, the fallback resource
should be attempted first before giving up.

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

Submitted by: covener
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1677186 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/mappers/mod_dir.c

diff --git a/CHANGES b/CHANGES
index 43d60334ffff6eb31ee63514291e14e79ad1108c..a04c2798c051c13b2d394873bae75a3ec558dc12 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,10 @@ Changes with Apache 2.4.13
   *) mod_status: Add more data to machine readable server-status produced
      when using the "?auto" query string.  [Rainer Jung]
 
+  *) 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]
diff --git a/STATUS b/STATUS
index 8cf48dbb9c6362589055aa063a8f30a0d4cbbd54..730c1e4cb06154ac85bea6ebdcdff833e79019fe 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -105,11 +105,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_dir: Use FallBackResource when DirectoryIndex is not available. PR56067
-     trunk patch: 1675103
-     2.4.x patch: trunk works (modulo CHANGES)
-     +1: covener, druggeri, jim
-
   *) mod_log_config: Add new format flag for requestion duration in milliseconds
      trunk patch: http://svn.apache.org/r1675533
      2.4.x patch: trunk works (modulo CHANGES)
index 542236b54f42c248f33baaf808e2cb700b545a53..0e8ab55f016d24ef9b10ff569274860b67331b8f 100644 (file)
@@ -383,8 +383,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 */