summaryrefslogtreecommitdiff
path: root/modules/filters
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2020-02-16 23:08:32 +0000
committerYann Ylavic <ylavic@apache.org>2020-02-16 23:08:32 +0000
commitc8f486d716ffc63bd0004055abceb47b636e6b7c (patch)
tree96e250cce15920738e748b355617f024d9094bd3 /modules/filters
parente957c6ddc9821d7fde7cf222dbb13f4025f3dcb0 (diff)
downloadhttpd-c8f486d716ffc63bd0004055abceb47b636e6b7c.tar.gz
Follow up to r1873941: define AP_REG_NO_DEFAULT for raw ap_regcomp() usage.
This avoids having to define AP_REG_NO_* for each APR_REG_* specific option, thus replacing AP_REG_NO_DOTALL introduced lately. For ap_rxplus_compile() and mod_substitute where default AP_REG_DOTALL is not suitable, let's use: AP_REG_NO_DEFAULT | ap_regcomp_get_default_cflags() & AP_REG_DOLLAR_ENDONLY to keep the default AP_REG_DOLLAR_ENDONLY unless RegexDefaultOptions unsets it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1874090 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/filters')
-rw-r--r--modules/filters/mod_substitute.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/filters/mod_substitute.c b/modules/filters/mod_substitute.c
index 29e05b05ba..efbdffc404 100644
--- a/modules/filters/mod_substitute.c
+++ b/modules/filters/mod_substitute.c
@@ -716,8 +716,10 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line)
/* first see if we can compile the regex */
if (!is_pattern) {
- r = ap_pregcomp(cmd->pool, from, AP_REG_NO_DOTALL | AP_REG_EXTENDED |
- (ignore_case ? AP_REG_ICASE : 0));
+ int flags = AP_REG_NO_DEFAULT
+ | (ap_regcomp_get_default_cflags() & AP_REG_DOLLAR_ENDONLY)
+ | (ignore_case ? AP_REG_ICASE : 0);
+ r = ap_pregcomp(cmd->pool, from, flags);
if (!r)
return "Substitute could not compile regex";
}