Received: (qmail 9828 invoked by uid 2012); 3 Nov 1998 01:52:26 -0000 Message-Id: <19981103015226.9827.qmail@hyperreal.org> Date: 3 Nov 1998 01:52:26 -0000 From: Ryan Clifton Reply-To: rclifton@snowcrash.org To: apbugs@hyperreal.org Subject: RedirectMatch and Redirect rewrite URLs differently X-Send-Pr-Version: 3.2 >Number: 3333 >Category: mod_alias >Synopsis: RedirectMatch and Redirect rewrite URLs differently >Confidential: no >Severity: serious >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: duplicate >Submitter-Id: apache >Arrival-Date: Mon Nov 2 19:10:00 PST 1998 >Closed-Date: Sun May 06 12:40:58 PDT 2001 >Last-Modified: Sun May 06 12:40:58 PDT 2001 >Originator: rclifton@snowcrash.org >Release: 1.3.1 >Organization: >Environment: Solaris 2.6 (and 2.5), apache 1.3.1, gcc SunOS enterprise 5.6 Generic sun4u sparc SUNW,Ultra-4 >Description: I am trying to user RedirectMatch to redirect to a servlet. The config line looks like: RedirectMatch ^/admin(.*)$ http://my.site.com/webj?func=y\&t=1$1 Apache is HTML encoding the '?' as %3f, which causes my servlet to be unable to parse the variable string. (%3f designates specifically to not treat it as a parameter). If I user Redirect the string is not HTML encodes (unfortunately I need reg-ex parsing or I wouldn't be writing this). The following works correctly (the '?' is not encoded): Redirect /admin http://my.site.com/webj?func=y&1 I read through all of the bug report and saw no mention of this, so I did not bother to upgrade from 1.3.1 to 1.3.3. >How-To-Repeat: Create two redirects: Redirect /junk http://your.server.com/junk?x=1&y=2 (works) final URL looks like : http://your.server.com/junk?x=1&y=2 RedirectMatch ^/junk2(.*) http://your.server.com/junk?x=1\&u=2$1 (encodes the '?') final URL looks like: http://your.server.com/junk%3fx=1&u=2 >Fix: RedirectMatch likely is doing an HTML encode unnecessarily. >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: rbb State-Changed-When: Sun May 6 12:40:58 PDT 2001 State-Changed-Why: This bug is being tracked in PR 7503. Please test the patch in that PR and let us know if it works for you. Class-Changed-From-To: sw-bug-duplicate Class-Changed-By: rbb Class-Changed-When: Sun May 6 12:40:58 PDT 2001 >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]