]> granicus.if.org Git - apache/commitdiff
Change default of mod_substitute to flattening...
authorJim Jagielski <jim@apache.org>
Thu, 14 Feb 2008 14:48:13 +0000 (14:48 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 14 Feb 2008 14:48:13 +0000 (14:48 +0000)
Via current discussion on dev@httpd

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

CHANGES
docs/manual/mod/mod_substitute.xml
modules/filters/mod_substitute.c

diff --git a/CHANGES b/CHANGES
index 598479ce57103b93632b3af6a16cb331ac5e54cb..aeced58359d22eb36d77f427729e3ba649bdf012 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,11 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) mod_substitute: The default is now flattening the buckets after
+     each substitution. The newly added 'q' flag allows for the
+     quicker, more efficient bucket-splitting if the user so
+     desires. [Jim Jagielski]
+
   *) Added 'disablereuse' option for ProxyPass which, essentially,
      disables connection pooling for the backend servers.
      [Jim Jagielski]
index fabd95f53d051c4a670829f55e51ac26b22a6026..180f28b5dc5015eece75da09b0b4bc18a6142a5c 100644 (file)
@@ -37,7 +37,7 @@
 <directivesynopsis>
 <name>Substitute</name>
 <description>Pattern to filter the response content</description>
-<syntax>Substitute <var>s/pattern/substitution/[inf]</var></syntax>
+<syntax>Substitute <var>s/pattern/substitution/[infq]</var></syntax>
 <contextlist><context>directory</context>
 <context>.htaccess</context></contextlist>
 <override>FileInfo</override>
         <dt><code>f</code></dt>
         <dd>The <code>f</code> flag causes mod_substitute to flatten the
         result of a substitution allowing for later substitutions to
-        take place on the boundary of this one.</dd>
+        take place on the boundary of this one. This is the default.</dd>
+        <dt><code>q</code></dt>
+        <dd>The <code>q</code> flag causes mod_substitute to not
+        flatten the buckets after each substitution. This can
+        result in much faster response and a decrease in memory
+        utilization, but should only be used if there is no possibility
+        that the result of one substitution will ever match a pattern
+        or regex of a subsequent one.</dd>
     </dl>
     
     <example><title>Example</title>
index 592d14049118a2eacc9e685725ef1c33a6b7d584..9774369926bf48a4c61a94982452a76febf3dfa7 100644 (file)
@@ -488,7 +488,7 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line)
     subst_pattern_t *nscript;
     int is_pattern = 0;
     int ignore_case = 0;
-    int flatten = 0;
+    int flatten = 1;
     ap_regex_t *r = NULL;
 
     if (apr_tolower(*line) != 's') {
@@ -525,8 +525,10 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line)
             is_pattern = 1;
         else if (delim == 'f')
             flatten = 1;
+        else if (delim == 'q')
+            flatten = 0;
         else
-            return "Bad Substitute flag, only s///[inf] are supported";
+            return "Bad Substitute flag, only s///[infq] are supported";
         flags++;
     }