]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge of r1864192 from trunk:
authorStefan Eissing <icing@apache.org>
Fri, 2 Aug 2019 09:24:58 +0000 (09:24 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 2 Aug 2019 09:24:58 +0000 (09:24 +0000)
  *) core, rewrite: Set PCRE_DOTALL by default

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1864213 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
docs/manual/mod/core.xml
server/util_pcre.c

diff --git a/CHANGES b/CHANGES
index bf00b5114b0e97f1774b45fb4149e70aa6907963..ad4fd27625be2527b1180f62d38ed9966806b4f0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.40
 
+  *) core, mod_rewrite: Set PCRE_DOTALL by default. Revert via 
+     RegexDefaultOptions -DOTALL [Yann Ylavic]
+
   *) core: Remove request details from built-in error documents [Eric Covener]
 
   *) mod_http2: core setting "LimitRequestFieldSize" is not additionally checked on
diff --git a/STATUS b/STATUS
index 3c3cf39f48e475809132afa3782fc836c4939931..f9bfc678fd4a5dd1ff218a9e9be34f6bf9c1c45c 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -127,11 +127,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) core, rewrite: Set PCRE_DOTALL by default
-     trunk: http://svn.apache.org/1864192
-     2.4.x: svn merge  -c 1864192 ^/httpd/httpd/trunk .
-     +1: covener, rpluem, icing
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index d9f0895af4d864d5d0f5e3c68301a7372a7830b3..d4d6030dc598323e314bd17057999ba2ff75a436 100644 (file)
@@ -4061,7 +4061,7 @@ Protocols h2 http/1.1
     <name>RegexDefaultOptions</name>
     <description>Allow to configure global/default options for regexes</description>
     <syntax>RegexDefaultOptions [none] [+|-]<var>option</var> [[+|-]<var>option</var>] ...</syntax>
-    <default>RegexDefaultOptions DOLLAR_ENDONLY</default>
+    <default>RegexDefaultOptions DOTALL DOLLAR_ENDONLY</default>
     <contextlist><context>server config</context></contextlist>
     <compatibility>Only available from Apache 2.4.30 and later.</compatibility>
     
@@ -4080,24 +4080,26 @@ Protocols h2 http/1.1
             <dt><code>ICASE</code></dt>
             <dd>Use a case-insensitive match.</dd>
 
+            <dt><code>EXTENDED</code></dt>
+            <dd>Perl's /x flag, ignore (unescaped-)spaces and comments in the pattern.</dd>
+
             <dt><code>DOTALL</code></dt>
-            <dd>Perl's /s flag.</dd>
+            <dd>Perl's /s flag, '.' matches newline characters.</dd>
 
             <dt><code>DOLLAR_ENDONLY</code></dt>
             <dd>'$' matches at end of subject string only.</dd>
-            <dd>.</dd>
         </dl>
         <highlight language="config">
-# 
-RegexDefaultOptions +ICASE +DOLLAR_ENDONLY
+# Add the ICASE option for all regexes by default
+RegexDefaultOptions +ICASE
 ...
-# Remove the ICASE option, but keep all the other already set options
-RegexDefaultOptions -ICASE
+# Remove the default DOLLAR_ENDONLY option, but keep any other one
+RegexDefaultOptions -DOLLAR_ENDONLY
 ...
-# Set the default option to DOTALL, resetting any other option
+# Set the DOTALL option only, resetting any other one
 RegexDefaultOptions DOTALL
 ...
-# Reset all defined option
+# Reset all defined options
 RegexDefaultOptions none
 ...
         </highlight>
index f2cb1bb01e8c87d29fefdfce747cb51f66f6d6e9..35831f500f9a40791eee7841a82f373bf02d9068 100644 (file)
@@ -120,7 +120,8 @@ AP_DECLARE(void) ap_regfree(ap_regex_t *preg)
  *            Compile a regular expression       *
  *************************************************/
 
-static int default_cflags = AP_REG_DOLLAR_ENDONLY;
+static int default_cflags = AP_REG_DOTALL |
+                            AP_REG_DOLLAR_ENDONLY;
 
 AP_DECLARE(int) ap_regcomp_get_default_cflags(void)
 {