Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 69713 invoked by uid 500); 31 Jan 2001 23:05:25 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 69691 invoked from network); 31 Jan 2001 23:05:20 -0000 Date: Wed, 31 Jan 2001 17:05:26 -0600 From: Christopher A Bongaarts To: new-httpd@apache.org Subject: [PATCH] fix for mod_rewrite RewriteMap in 1.3.17 Message-ID: <20010131170526.G14001@earth.tc.umn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-URL: http://umn.edu/~cab X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N [Apologies if this is not the ideal place for this...] Here's a patch against the released 1.3.17 mod_rewrite that fixes RewriteMap expansion. This fixes PR7157 and PR7158 (duplicates) in the bugdb. %% Christopher A. Bongaarts %% cab@tc.umn.edu %% %% Internet Services %% http://umn.edu/~cab %% %% University of Minnesota %% +1 (612) 625-1809 %% ----snip---- --- mod_rewrite.c.orig Tue Jan 30 12:19:42 2001 +++ mod_rewrite.c Wed Jan 31 16:47:09 2001 @@ -2287,11 +2287,11 @@ 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 = ap_pstrndup(r->pool, inp+2, key-inp-2); - dflt = find_char_in_brackets(inp, '|', '{', '}'); + dflt = find_char_in_brackets(inp+2, '|', '{', '}'); if (dflt == NULL) { key = ap_pstrndup(r->pool, key+1, endp-key-1); dflt = "";