httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1557641 - in /httpd/httpd/trunk: CHANGES include/ap_mmn.h modules/mappers/mod_dir.c modules/mappers/mod_rewrite.c modules/mappers/mod_rewrite.h
Date Mon, 13 Jan 2014 01:51:59 GMT
Author: covener
Date: Mon Jan 13 01:51:58 2014
New Revision: 1557641

URL: http://svn.apache.org/r1557641
Log:
don't search for directory indexes/directoryslashes if a URL is in the
middle of being rewritten [in per-dir context]. PR53929

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/include/ap_mmn.h
    httpd/httpd/trunk/modules/mappers/mod_dir.c
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c
    httpd/httpd/trunk/modules/mappers/mod_rewrite.h

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1557641&r1=1557640&r2=1557641&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Jan 13 01:51:58 2014
@@ -2,6 +2,9 @@
 Changes with Apache 2.5.0
 
 
+  *) mod_dir: Don't search for a DirectoryIndex or DirectorySlash on a URL
+     that was just rewritten by mod_rewrite. PR53929. [Eric Covener]
+
   *) mod_dir: Add DirectoryCheckHandler to allow a 2.2-like behavior, skipping 
      execution when a handler is already set. PR53929. [Eric Covener]
 

Modified: httpd/httpd/trunk/include/ap_mmn.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_mmn.h?rev=1557641&r1=1557640&r2=1557641&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_mmn.h (original)
+++ httpd/httpd/trunk/include/ap_mmn.h Mon Jan 13 01:51:58 2014
@@ -445,6 +445,7 @@
  * 20131112.1 (2.5.0-dev)  Add suspend_connection and resume_connection hooks
  * 20131112.2 (2.5.0-dev)  Add ap_regname
  * 20131230.0 (2.5.0-dev)  cl_head_zero & expect_strict added to server_config
+ * 20131230.1 (2.5.0-dev)  REDIRECT_HANDLER_NAME in mod_rewrite.h
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
@@ -452,7 +453,7 @@
 #ifndef MODULE_MAGIC_NUMBER_MAJOR
 #define MODULE_MAGIC_NUMBER_MAJOR 20131230
 #endif
-#define MODULE_MAGIC_NUMBER_MINOR 0                  /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 1                  /* 0...n */
 
 /**
  * Determine if the server's current MODULE_MAGIC_NUMBER is at least a

Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_dir.c?rev=1557641&r1=1557640&r2=1557641&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_dir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_dir.c Mon Jan 13 01:51:58 2014
@@ -29,6 +29,7 @@
 #include "http_log.h"
 #include "http_main.h"
 #include "util_script.h"
+#include "mod_rewrite.h"
 
 module AP_MODULE_DECLARE_DATA dir_module;
 
@@ -277,6 +278,11 @@ static int fixup_dir(request_rec *r)
         return DECLINED;
     }
 
+    /* we're running between mod_rewrites fixup and its internal redirect handler, step aside
*/
+    if (!strcmp(r->handler, REDIRECT_HANDLER_NAME)) { 
+        return DECLINED;
+    }
+
     if (d->index_names) {
         names_ptr = (char **)d->index_names->elts;
         num_names = d->index_names->nelts;

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1557641&r1=1557640&r2=1557641&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Mon Jan 13 01:51:58 2014
@@ -5027,7 +5027,7 @@ static int hook_fixup(request_rec *r)
             rewritelog((r, 1, dconf->directory, "internal redirect with %s "
                         "[INTERNAL REDIRECT]", r->filename));
             r->filename = apr_pstrcat(r->pool, "redirect:", r->filename, NULL);
-            r->handler = "redirect-handler";
+            r->handler = REDIRECT_HANDLER_NAME;
             return OK;
         }
     }
@@ -5073,7 +5073,7 @@ static int hook_mimetype(request_rec *r)
  */
 static int handler_redirect(request_rec *r)
 {
-    if (strcmp(r->handler, "redirect-handler")) {
+    if (strcmp(r->handler, REDIRECT_HANDLER_NAME)) {
         return DECLINED;
     }
 

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.h?rev=1557641&r1=1557640&r2=1557641&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.h (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.h Mon Jan 13 01:51:58 2014
@@ -29,6 +29,8 @@
 #include "apr_optional.h"
 #include "httpd.h"
 
+#define REDIRECT_HANDLER_NAME "redirect-handler"
+
 /* rewrite map function prototype */
 typedef char *(rewrite_mapfunc_t)(request_rec *r, char *key);
 



Mime
View raw message