Received: (qmail 21983 invoked by uid 2012); 21 Aug 1998 14:42:47 -0000 Message-Id: <19980821144247.21982.qmail@hyperreal.org> Date: 21 Aug 1998 14:42:47 -0000 From: Jason Doobie Reply-To: doobie@wwa.com To: apbugs@hyperreal.org Subject: RedirectMatch does not correctly deal with URLs which need to be escaped. (simular to PR#1155) X-Send-Pr-Version: 3.2 >Number: 2888 >Category: mod_alias >Synopsis: RedirectMatch does not correctly deal with URLs which need to be escaped. (simular to PR#1155) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Fri Aug 21 07:50:00 PDT 1998 >Last-Modified: Thu Feb 11 13:18:37 PST 1999 >Originator: doobie@wwa.com >Organization: >Release: 1.3.1 >Environment: Linux, debian 1.3.1-3 package >Description: This problem was supposed to have been fixed by PR#1155, however I think the patched code was placed in a section that allows it to not work if your using CGI scripts. I have done the following in my httpd.conf file for a certain domain: RedirectMatch /(.*)$ http://www.domain.com/test.html?structure=$1 It writes it to the log as File does not exist: ..../test.html?structure=whatever. >How-To-Repeat: The site is on an Intranet of mine but heres a slice of the httpd.conf file I use ... ServerName olddomain.com RedirectMatch /(.*)$ http://www.domain.com/test.html?structure=$1 And if you go to: http://www.olddomain.com/this_is_whatever.html it'll forward it to http://www.domain.com/test.html?structure=this_is_whatever.html However because when it looks for the file/parses the URL for CGI data it sees the ? %3f. >Fix: Change the location of parsing escaped characters to be sooner, or as they are read in from the client. >Audit-Trail: State-Changed-From-To: open-feedback State-Changed-By: rse State-Changed-When: Thu Sep 10 00:57:05 PDT 1998 State-Changed-Why: A few questions: 1. I've looked at the code and couldn't find a relation to any CGI things. Why do you think it has something to do with CGI? Your example doesn't use CGI... 2. I've tried out your example RedirectMatch /(.*)$ http://www.domain.com/test.html?structure=$1 and it worked fine for me under Apache 1.3.2-dev. Can it be that you're using a slightly different directive or a Redirectmatch in a different context (which could be the reason for the failure)? Comment-Added-By: lars Comment-Added-When: Sat Nov 14 09:26:30 PST 1998 Comment-Added: [This is a standard response.] This Apache problem report has not been updated recently. Please reply to this message if you have any additional information about this issue, or if you have answers to any questions that have been posed to you. If there are no outstanding questions, please consider this a request to try to reproduce the problem with the latest software release, if one has been made since last contact. If we don't hear from you, this report will be closed. If you have information to add, BE SURE to reply to this message and include the apbugs@Apache.Org address so it will be attached to the problem report! State-Changed-From-To: feedback-closed State-Changed-By: lars State-Changed-When: Thu Feb 11 13:18:36 PST 1999 State-Changed-Why: [This is a standard response.] No response from submitter, assuming issue has been resolved. >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! ]