Checkout Tools
  • last updated 6 hours ago
Constraints: committers
Constraints: files
Constraints: dates
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.

  1. … 4 more files in changeset.
Fix spelling errors found by codespell. [skip ci]

  1. … 100 more files in changeset.
don't use DOTALL from mod_substitute which leaves \n at the end of the line.

  1. … 4 more files in changeset.
factor out default regex flags

  1. … 3 more files in changeset.
set PCRE_DOTALL by default

Submitted by ylavic

  1. … 2 more files in changeset.
Correctly identify origin of util_pcre.c/ap_regex.h as pcreposix[.ch]

and correct LICENSE/NOTICE to match.

  1. … 3 more files in changeset.
Follow up to r1824339: s/strcasecmp/ap_cstr_casecmp/ as suggested by Ruediger.

regex: Allow to configure global/default options for regexes.

Like caseless matching or extended format, which may be useful as default

behaviour the whole configuration.

  1. … 3 more files in changeset.
ap_expr: open string expressions to the <word>.

Introduces the syntax "%{:<word>:}", borrowed from the <var>'s one, and which

likewise can be embedded anywhere in a string expression (the same reserved

character ':' gets reused in an unambiguous manner).

This allows the two types of expressions (boolean and string) to now share

fully the same language set, namely: strings, lists, vars, regexes, backrefs,

functions with multiple or complex arguments, and especially combinations


Most of them were reserved to boolean expressions only, while complex string

constructions can also benefit to, well, strings. The <word> construct allows

that (say the syntax "%{:<word>:}" looks like a temporary variable constructed

in a string).

Since string expressions may now have to deal with lists (arrays), they also

need a way to produce/extract strings from list and vice versa. This can be

done with the new "join" and "split" operators, while the new substitution

regexes (like "s/<pattern>/<substitute>/<flags>") may be used to manipulate

strings in place. All this of course available for both string and boolean


Tests and doc updates upcoming..

  1. … 8 more files in changeset.
With the changes of api from pcre 8.x to 10.x, do not presume that the internal

ovector will be created to accept greater than nmatch elements for processing.

Allocate enough elts in all circumstances for pcre2api.

Replace PCRE with PCRE2 where it is available.

This patch removes the needless assignment of re_erroffset in the conf pool

by the worker threads; such mistakes break the shared copy-on-write pages of

memory that should have remained common between all httpd worker processes.

Two de-optimizations are inherent in this patch, the former ovector-on-stack

opportunity is lost unless implemented as a new general context. Safer that

we either create a new general context using pool allocation, or recycle a

per pool or per thread match_data buffer of some arbitrary 10 elts or so.

Submitted by: wrowe, Petr Pisar <ppisar@redhat.com>

  1. … 1 more file in changeset.
Re-introduce check for sufficient PCRE version.

Add compiled and loaded PCRE version numbers

to "httpd -V" output and to mod_info page.

  1. … 3 more files in changeset.
Check for correct minimum PCRE version in configure,

do not check in source code.

  1. … 1 more file in changeset.
Clarify comment.

And use #error if we get past configure...

* Only use PCRE_DUPNAMES if it is present (only in more recent versions of PCRE)
Add a "MATCH_" prefix to variables set within


  1. … 5 more files in changeset.
core: Support named groups and backreferences within the LocationMatch,

DirectoryMatch, FilesMatch and ProxyMatch directives.

  1. … 8 more files in changeset.
Make ap_regcomp() return AP_REG_ESPACE if out of memory. Make ap_pregcomp()

abort if out of memory.

This raises the minimum PCRE requirement to version 6.0, released in 2005.

  1. … 3 more files in changeset.
BZ 52623: Fix building against PCRE 8.30.

PCRE dropped support for pcre_info() which is

deprecated since a long time. Use pcre_fullinfo()

instead, which exists since version 3.0 of PCRE.

Patch provided by Ruediger Pluem.

  1. … 2 more files in changeset.
Cleanup effort in prep for GA push:

Trim trailing whitespace... no func change

  1. … 118 more files in changeset.
Change the indentation to resemble the rest of the project. No code change.

Add ap_regexec_len() function that works with non-null-terminated


PR: 51231

Submitted by: Yehezkel Horowitz <horowity checkpoint com>, Stefan Fritsch

  1. … 3 more files in changeset.
* server/util_pcre.c (ap_regerror): Use passed-in buffer size rather

than the size of a pointer.

Introduce ap_rxplus class: higher-level regexps supporting perl-style

regexp operations.

  1. … 4 more files in changeset.
Code cleanup: replace strncpy by apr_cpystrn or apr_pstrmemdup

Submitted by: Takashi Sato <takashi lans tv com>

PR: 43432

  1. … 3 more files in changeset.
revert last change
Update the last year of copyright.

  1. … 350 more files in changeset.
No functional Change: Removing trailing whitespace. This also

means that "blank" lines consisting of just spaces or

tabs are now really blank lines

  1. … 180 more files in changeset.