httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1418954 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS docs/manual/mod/mod_rewrite.xml modules/mappers/mod_rewrite.c
Date Sun, 09 Dec 2012 13:45:57 GMT
Author: sf
Date: Sun Dec  9 13:45:56 2012
New Revision: 1418954

URL: http://svn.apache.org/viewvc?rev=1418954&view=rev
Log:
Merge r1410681:

   * mod_rewrite: PR53963: Ad an opt-in RewriteOption to control merging of RewriteBase
                  (This merge started happening in 2.4.0/2.2.23)

Submitted by: covener
Reviewed by: covener, minfrin, sf


Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/docs/manual/mod/mod_rewrite.xml
    httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1410681

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1418954&r1=1418953&r2=1418954&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Sun Dec  9 13:45:56 2012
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.4.4
 
+  *) mod_rewrite: Stop mergeing RewriteBase down to subdirectories
+     unless new option 'RewriteOptions MergeBase' is configured.
+     PR 53963. [Eric Covener]
+
   *) mod_status, mod_info, mod_proxy_ftp, mod_proxy_balancer, mod_imagemap,
      mod_ldap: Improve escaping of hostname and URIs HTML output.
      [Jim Jagielski, Stefan Fritsch]

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1418954&r1=1418953&r2=1418954&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sun Dec  9 13:45:56 2012
@@ -91,12 +91,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_rewrite: PR53963: Ad an opt-in RewriteOption to control merging of RewriteBase
-                  (This merge started happening in 2.4.3/2.2.23)
-     trunk patch: http://svn.apache.org/viewvc?rev=1410681&view=rev
-     2.4.x patch: http://people.apache.org/~covener/patches/httpd-2.4.x-rewritebase_optional.diff
-     +1 covener, minfrin, sf
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.4.x/docs/manual/mod/mod_rewrite.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/mod/mod_rewrite.xml?rev=1418954&r1=1418953&r2=1418954&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/mod/mod_rewrite.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/mod/mod_rewrite.xml Sun Dec  9 13:45:56 2012
@@ -220,6 +220,16 @@ later</compatibility>
       </note>
       </dd>
 
+      <dt><code>MergeBase</code></dt>
+      <dd>
+
+      <p>With this option, the value of <directive module="mod_rewrite"
+      >RewriteBase</directive> is copied from where it's explicitly defined
+      into any sub-directory or sub-location that doesn't define its own
+      <directive module="mod_rewrite">RewriteBase</directive>. This was the
+      default behavior in 2.4.0 thorugh 2.4.3, and the flag to restore it is
+      available Apache HTTP Server 2.4.4 and later.</p>
+      </dd>
       </dl>
 
 </usage>

Modified: httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c?rev=1418954&r1=1418953&r2=1418954&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/branches/2.4.x/modules/mappers/mod_rewrite.c Sun Dec  9 13:45:56 2012
@@ -191,6 +191,7 @@ static const char* really_last_key = "re
 #define OPTION_INHERIT_BEFORE       1<<2
 #define OPTION_NOSLASH              1<<3
 #define OPTION_ANYURI               1<<4
+#define OPTION_MERGEBASE            1<<5
 
 #ifndef RAND_MAX
 #define RAND_MAX 32767
@@ -2821,8 +2822,11 @@ static void *config_perdir_merge(apr_poo
     a->state_set = overrides->state_set || base->state_set;
     a->options = (overrides->options_set == 0) ? base->options : overrides->options;
     a->options_set = overrides->options_set || base->options_set;
-    a->baseurl = (overrides->baseurl_set == 0) ? base->baseurl : overrides->baseurl;
-    a->baseurl_set = overrides->baseurl_set || base->baseurl_set;
+
+    if (a->options & OPTION_MERGEBASE) { 
+        a->baseurl = (overrides->baseurl_set == 0) ? base->baseurl : overrides->baseurl;
+        a->baseurl_set = overrides->baseurl_set || base->baseurl_set;
+    }
 
     a->directory  = overrides->directory;
 
@@ -2897,6 +2901,9 @@ static const char *cmd_rewriteoptions(cm
         else if (!strcasecmp(w, "allowanyuri")) {
             options |= OPTION_ANYURI;
         }
+        else if (!strcasecmp(w, "mergebase")) {
+            options |= OPTION_MERGEBASE;
+        }
         else {
             return apr_pstrcat(cmd->pool, "RewriteOptions: unknown option '",
                                w, "'", NULL);



Mime
View raw message