httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1675103 - in /httpd/httpd/trunk: CHANGES modules/mappers/mod_dir.c
Date Tue, 21 Apr 2015 12:23:33 GMT
Author: covener
Date: Tue Apr 21 12:23:33 2015
New Revision: 1675103

URL: http://svn.apache.org/r1675103
Log:
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


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/mappers/mod_dir.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1675103&r1=1675102&r2=1675103&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Apr 21 12:23:33 2015
@@ -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]

Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_dir.c?rev=1675103&r1=1675102&r2=1675103&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_dir.c Tue Apr 21 12:23:33 2015
@@ -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 */



Mime
View raw message