Support for pcre and pcre2 rewritten
The pcre2posix
(or pcreposix) layer is no longer used. Instead, pound uses the native API of the corresponding library. This provides for the additional speed-up and (in case of pcre2) avoids coredumps under high load.
Use of POSIX and Perl-compatible regular expressions
In contrast to previous versions, both types of regular expressions can be used simultaneously in the configuration file. The flavour of the regex to use can be specified either individually with each request matching statement (such as URL
, Header
, etc.), or globally.
To set it globally, use the RegexType
statement. The type of regular expression set by it will be used in all matching statements that appear below that statement, unless they declare regex type explicitly. It remains in effect until next RegexType
statement or end of file is encountered, whichever occurs first. For example, to use PCRE by default, add the following statement somewhere near the beginning of your pound.cfg
file:
RegexType pcre
To change the default back to POSIX regexps, do
RegexType posix
Regular expression type can also be specified with each matching statement individually. For example, the -pcre
option indicates that Perl-compatible regular expression is given as argument, e.g.:
Host -pcre -icase "(?<!www\\.)example.org"
Similarly, the -posix
option indicates that POSIX extended regular expression is used. Use these options to override the default for a single statement.
New matching option: -contain
The -contain
option enables substring match. E.g. the following will match if URL contains the word "user" (case-insensitive):
URL -contain -icase "user"
New configuration statement: LogTag
Sets a string to tag syslog messages with. By default, the name used to start the program is assumed.
Bugfixes
- Fix infinite recursion on reporting an out of memory condition.
- Fix deadlock in session expiration handling.
- Fix RewriteLocation functionality.