74 lines
2.4 KiB
Diff
74 lines
2.4 KiB
Diff
From f11d5830759eb50ed366fc0690f9f4f491064ea3 Mon Sep 17 00:00:00 2001
|
|
From: Jim Jagielski <jim@apache.org>
|
|
Date: Tue, 11 Feb 2020 13:16:38 +0000
|
|
Subject: [PATCH 1/2] Merge r1873747 from trunk:
|
|
|
|
factor out default regex flags
|
|
|
|
Submitted by: covener
|
|
Reviewed by: covener, minfrin, jorton
|
|
|
|
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1873905 13f79535-47bb-0310-9956-ffa450edef68
|
|
---
|
|
include/ap_mmn.h | 1 +
|
|
include/ap_regex.h | 2 ++
|
|
server/core.c | 2 +-
|
|
server/util_pcre.c | 3 +--
|
|
4 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
|
|
index 839228e..f5043ef 100644
|
|
--- a/include/ap_mmn.h
|
|
+++ b/include/ap_mmn.h
|
|
@@ -515,6 +515,7 @@
|
|
* 20120211.77 (2.4.34-dev) Add ap_exists_directive()
|
|
* 20120211.78 (2.4.34-dev) Add response_field_size to proxy_worker_shared
|
|
* 20120211.79 (2.4.34-dev) Add AP_GETLINE_NOSPC_EOL flag to http_protocol.h
|
|
+ * 20120211.90 (2.4.42-dev) AP_REG_DEFAULT macro in ap_regex.h
|
|
*/
|
|
|
|
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
|
|
diff --git a/include/ap_regex.h b/include/ap_regex.h
|
|
index 7d8df79..e651eea 100644
|
|
--- a/include/ap_regex.h
|
|
+++ b/include/ap_regex.h
|
|
@@ -86,6 +86,8 @@ extern "C" {
|
|
|
|
#define AP_REG_MATCH "MATCH_" /** suggested prefix for ap_regname */
|
|
|
|
+#define AP_REG_DEFAULT (AP_REG_DOTALL|AP_REG_DOLLAR_ENDONLY)
|
|
+
|
|
/* Error values: */
|
|
enum {
|
|
AP_REG_ASSERT = 1, /** internal error ? */
|
|
diff --git a/server/core.c b/server/core.c
|
|
index e892c87..a8772a3 100644
|
|
--- a/server/core.c
|
|
+++ b/server/core.c
|
|
@@ -4938,7 +4938,7 @@ static int core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptem
|
|
apr_pool_cleanup_register(pconf, NULL, reset_config_defines,
|
|
apr_pool_cleanup_null);
|
|
|
|
- ap_regcomp_set_default_cflags(AP_REG_DOLLAR_ENDONLY);
|
|
+ ap_regcomp_set_default_cflags(AP_REG_DEFAULT);
|
|
|
|
mpm_common_pre_config(pconf);
|
|
|
|
diff --git a/server/util_pcre.c b/server/util_pcre.c
|
|
index 35831f5..74722b4 100644
|
|
--- a/server/util_pcre.c
|
|
+++ b/server/util_pcre.c
|
|
@@ -120,8 +120,7 @@ AP_DECLARE(void) ap_regfree(ap_regex_t *preg)
|
|
* Compile a regular expression *
|
|
*************************************************/
|
|
|
|
-static int default_cflags = AP_REG_DOTALL |
|
|
- AP_REG_DOLLAR_ENDONLY;
|
|
+static int default_cflags = AP_REG_DEFAULT;
|
|
|
|
AP_DECLARE(int) ap_regcomp_get_default_cflags(void)
|
|
{
|
|
--
|
|
1.8.3.1
|
|
|