summaryrefslogtreecommitdiffstats
path: root/server/util.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2010-01-30 12:20:53 +0100
committerStefan Fritsch <sf@apache.org>2010-01-30 12:20:53 +0100
commit7b74009049025b3098ce8c49939d56887eac6d04 (patch)
tree84dd17f5f9162953d6590812c472cb092173ef2f /server/util.c
parentUpdate transformations (diff)
downloadapache2-7b74009049025b3098ce8c49939d56887eac6d04.tar.xz
apache2-7b74009049025b3098ce8c49939d56887eac6d04.zip
Make ap_pregsub(), used by AliasMatch and friends, use the same syntax
for regex backreferences as mod_rewrite and mod_include: Remove the use of '&' as an alias for '$0' and allow to escape any character with a backslash. Document the use of $0. PR: 48351 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@904765 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util.c')
-rw-r--r--server/util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/util.c b/server/util.c
index 729c754baa..e645235de5 100644
--- a/server/util.c
+++ b/server/util.c
@@ -376,15 +376,13 @@ AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input,
len = 0;
while ((c = *src++) != '\0') {
- if (c == '&')
- no = 0;
- else if (c == '$' && apr_isdigit(*src))
+ if (c == '$' && apr_isdigit(*src))
no = *src++ - '0';
else
no = 10;
if (no > 9) { /* Ordinary character. */
- if (c == '\\' && (*src == '$' || *src == '&'))
+ if (c == '\\' && *src)
c = *src++;
len++;
}