diff options
author | Eric Covener <covener@apache.org> | 2020-02-12 14:36:40 +0100 |
---|---|---|
committer | Eric Covener <covener@apache.org> | 2020-02-12 14:36:40 +0100 |
commit | b6dd2f55dc8735ec09ed0830ba7ec78dd99cde7f (patch) | |
tree | c53be323d0e1a03d78978828123cc67b63d2e26d /server/util_pcre.c | |
parent | Add a missing APLOGNO() (diff) | |
download | apache2-b6dd2f55dc8735ec09ed0830ba7ec78dd99cde7f.tar.xz apache2-b6dd2f55dc8735ec09ed0830ba7ec78dd99cde7f.zip |
don't use DOTALL from mod_substitute which leaves \n at the end of the line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873941 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_pcre.c')
-rw-r--r-- | server/util_pcre.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/util_pcre.c b/server/util_pcre.c index 581ccc031d..94e85e44a0 100644 --- a/server/util_pcre.c +++ b/server/util_pcre.c @@ -179,6 +179,9 @@ AP_DECLARE(int) ap_regcomp_default_cflag_by_name(const char *name) else if (ap_cstr_casecmp(name, "DOTALL") == 0) { cflag = AP_REG_DOTALL; } + else if (ap_cstr_casecmp(name, "NO_DOTALL") == 0) { + cflag = AP_REG_NO_DOTALL; + } else if (ap_cstr_casecmp(name, "DOLLAR_ENDONLY") == 0) { cflag = AP_REG_DOLLAR_ENDONLY; } @@ -217,6 +220,8 @@ AP_DECLARE(int) ap_regcomp(ap_regex_t * preg, const char *pattern, int cflags) options |= PCREn(MULTILINE); if ((cflags & AP_REG_DOTALL) != 0) options |= PCREn(DOTALL); + if ((cflags & AP_REG_NO_DOTALL) != 0) + options &= ~PCREn(DOTALL); if ((cflags & AP_REG_DOLLAR_ENDONLY) != 0) options |= PCREn(DOLLAR_ENDONLY); |