1
0
mirror of https://github.com/apache/httpd.git synced 2025-07-29 09:01:18 +03:00

regex: Add AP_REG_NOTEMPTY_ATSTART maching option.

* include/ap_mmn.h:
  Bump MMN minor.

* include/ap_regex.h:
  Define AP_REG_NOTEMPTY_ATSTART bit.

* server/util_pcre.c(ap_regexec_ex):
  Map AP_REG_NOTEMPTY_ATSTART to native PCRE_NOTEMPTY_ATSTART.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915268 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yann Ylavic
2024-01-16 16:56:58 +00:00
parent e52a206008
commit 97a1873332
3 changed files with 6 additions and 1 deletions

View File

@ -722,6 +722,7 @@
* 20211221.16 (2.5.1-dev) Add ap_proxy_determine_address() * 20211221.16 (2.5.1-dev) Add ap_proxy_determine_address()
* 20211221.17 (2.5.1-dev) Add ap_proxy_worker_get_name() * 20211221.17 (2.5.1-dev) Add ap_proxy_worker_get_name()
* 20211221.18 (2.5.1-dev) Add ap_regexec_ex() * 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" */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
@ -729,7 +730,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR #ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20211221 #define MODULE_MAGIC_NUMBER_MAJOR 20211221
#endif #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 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a

View File

@ -89,6 +89,8 @@ extern "C" {
#define AP_REG_NO_DEFAULT 0x400 /**< Don't implicitely add AP_REG_DEFAULT options */ #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_MATCH "MATCH_" /**< suggested prefix for ap_regname */
#define AP_REG_DEFAULT (AP_REG_DOTALL|AP_REG_DOLLAR_ENDONLY) #define AP_REG_DEFAULT (AP_REG_DOTALL|AP_REG_DOLLAR_ENDONLY)

View File

@ -491,6 +491,8 @@ AP_DECLARE(int) ap_regexec_ex(const ap_regex_t *preg,
options |= PCREn(NOTEOL); options |= PCREn(NOTEOL);
if ((eflags & AP_REG_NOTEMPTY) != 0) if ((eflags & AP_REG_NOTEMPTY) != 0)
options |= PCREn(NOTEMPTY); options |= PCREn(NOTEMPTY);
if ((eflags & AP_REG_NOTEMPTY_ATSTART) != 0)
options |= PCREn(NOTEMPTY_ATSTART);
if ((eflags & AP_REG_ANCHORED) != 0) if ((eflags & AP_REG_ANCHORED) != 0)
options |= PCREn(ANCHORED); options |= PCREn(ANCHORED);