PR: 24219
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101665
13f79535-47bb-0310-9956-
ffa450edef68
[Remove entries to the current 2.0 section below, when backported]
+ *) mod_setenvif: Fix the regex optimizer, which under circumstances
+ treated the supplied regex as literal string. PR 24219.
+ [André Malo]
+
*) mod_autoindex: Don't omit the <tr> start tag if the SuppressIcon
option is set. PR 21668. [Jesse Tie-Ten-Quee <highos@highos.com>]
int in_escape = 0;
while (*src) {
- if (in_escape) {
+ switch (*src) {
+ case '^':
+ case '.':
+ case '$':
+ case '|':
+ case '(':
+ case ')':
+ case '[':
+ case ']':
+ case '*':
+ case '+':
+ case '?':
+ case '{':
+ case '}':
+ if (!in_escape) {
+ return NULL;
+ }
in_escape = 0;
- }
- else {
- switch (*src) {
- case '^':
- case '.':
- case '$':
- case '|':
- case '(':
- case ')':
- case '[':
- case ']':
- case '*':
- case '+':
- case '?':
- case '{':
- case '}':
+ break;
+ case '\\':
+ in_escape = 1;
+ escapes_found = 1;
+ break;
+ default:
+ if (in_escape) {
return NULL;
- case '\\':
- in_escape = 1;
- escapes_found = 1;
}
+ break;
}
src++;
}