httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r627764 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_substitute.xml modules/filters/mod_substitute.c
Date Thu, 14 Feb 2008 14:48:16 GMT
Author: jim
Date: Thu Feb 14 06:48:13 2008
New Revision: 627764

URL: http://svn.apache.org/viewvc?rev=627764&view=rev
Log:
Change default of mod_substitute to flattening...
Via current discussion on dev@httpd

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/docs/manual/mod/mod_substitute.xml
    httpd/httpd/trunk/modules/filters/mod_substitute.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=627764&r1=627763&r2=627764&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Feb 14 06:48:13 2008
@@ -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]

Modified: httpd/httpd/trunk/docs/manual/mod/mod_substitute.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_substitute.xml?rev=627764&r1=627763&r2=627764&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_substitute.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_substitute.xml Thu Feb 14 06:48:13 2008
@@ -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>
@@ -59,7 +59,14 @@
         <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>

Modified: httpd/httpd/trunk/modules/filters/mod_substitute.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_substitute.c?rev=627764&r1=627763&r2=627764&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_substitute.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_substitute.c Thu Feb 14 06:48:13 2008
@@ -488,7 +488,7 @@
     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 @@
             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++;
     }
 



Mime
View raw message