diff options
-rw-r--r-- | include/ap_mmn.h | 3 | ||||
-rw-r--r-- | include/ap_regex.h | 2 | ||||
-rw-r--r-- | server/util_pcre.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h index ea1ce0c43a..9d79c14e95 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -722,6 +722,7 @@ * 20211221.16 (2.5.1-dev) Add ap_proxy_determine_address() * 20211221.17 (2.5.1-dev) Add ap_proxy_worker_get_name() * 20211221.18 (2.5.1-dev) Add ap_regexec_ex() + * 20211221.19 (2.5.1-dev) Add AP_REG_NOTEMPTY_ATSTART */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ @@ -729,7 +730,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20211221 #endif -#define MODULE_MAGIC_NUMBER_MINOR 18 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 19 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/ap_regex.h b/include/ap_regex.h index f4fc88bf8b..a986194151 100644 --- a/include/ap_regex.h +++ b/include/ap_regex.h @@ -89,6 +89,8 @@ extern "C" { #define AP_REG_NO_DEFAULT 0x400 /**< Don't implicitely add AP_REG_DEFAULT options */ +#define AP_REG_NOTEMPTY_ATSTART 0x800 /**< Empty match not valid at first position */ + #define AP_REG_MATCH "MATCH_" /**< suggested prefix for ap_regname */ #define AP_REG_DEFAULT (AP_REG_DOTALL|AP_REG_DOLLAR_ENDONLY) diff --git a/server/util_pcre.c b/server/util_pcre.c index da85c2da5d..f8817d2896 100644 --- a/server/util_pcre.c +++ b/server/util_pcre.c @@ -491,6 +491,8 @@ AP_DECLARE(int) ap_regexec_ex(const ap_regex_t *preg, options |= PCREn(NOTEOL); if ((eflags & AP_REG_NOTEMPTY) != 0) options |= PCREn(NOTEMPTY); + if ((eflags & AP_REG_NOTEMPTY_ATSTART) != 0) + options |= PCREn(NOTEMPTY_ATSTART); if ((eflags & AP_REG_ANCHORED) != 0) options |= PCREn(ANCHORED); |