From 2cc359a37714dabbbb66e401c9604b71a43a161a Mon Sep 17 00:00:00 2001 From: Tony Finch Date: Thu, 1 Feb 2001 10:03:42 +0000 Subject: [PATCH] MF 1.3 the fis for the mod_rewrite stupidity. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87939 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 2 ++ modules/mappers/mod_rewrite.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 05b67886e4..af073bb881 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ Changes with Apache 2.0b1 + *) Really fix mod_rewrite map lookups this time. [Tony Finch] + *) Get the correct IP address if ServerName isn't set and we can't find a fully-qualified domain name at startup. PR#7170 [Danek Duvall ] diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index d7408351aa..d9b7fd7834 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -2308,11 +2308,11 @@ static void do_expand(request_rec *r, char *input, char *buffer, int nbuf, char *map, *key, *dflt, *result; char xkey[MAX_STRING_LEN]; char xdflt[MAX_STRING_LEN]; - key = find_char_in_brackets(inp, ':', '{', '}'); + key = find_char_in_brackets(inp+2, ':', '{', '}'); if (key == NULL) goto skip; map = apr_pstrndup(r->pool, inp+2, key-inp-2); - dflt = find_char_in_brackets(inp, '|', '{', '}'); + dflt = find_char_in_brackets(key+1, '|', '{', '}'); if (dflt == NULL) { key = apr_pstrndup(r->pool, key+1, endp-key-1); dflt = ""; -- 2.50.1