Closed Bug 77307 Opened 23 years ago Closed 23 years ago

%27 codes after url redirection

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: bert.andries, Assigned: jag+mozilla)

References

()

Details

Attachments

(1 file)

browsing http://www.linuxland.nl with 2001042220 on WinNT redirects to
http://www.linuxland.nl/%27index4.php%27  This gives "Not Found, The requested
URL /'index4.php' was not found on this server.
Other browsers do not show %27 in the redirected url, and succeed to load the
existing index4.php generated page.  Editing the Location/url to remove %27
works fine too.
The page in question has:

<meta http-equiv="refresh" content="0;url='index4.php'">

So they are indeed asking us to redirect to "'index4.php'"  (with the quotes).

ccing jag since he last touched the parsing of the content part of those refreshes.
OS: Windows NT → All
Hardware: PC → All
<'> is an unreserved character in RFC 2396 and MUST be treated as part of a URI.
<'index4.php'> is a valid relative URI even without any escapes.

-> Evangelism
Assignee: asa → blakeross
Status: UNCONFIRMED → NEW
Component: Browser-General → Evangelism
Ever confirmed: true
QA Contact: doronr → zach
Eh?  refresh isn't defined in the HTTP spec, so its syntax is defined by
tradition.  So shouldn't we be backwards-compatible?  (i.e., if it starts with a
quote, parse the URL until a matching quote)  Or is there good reason to do
something else?
Hmm, yes, Refresh isn't defined by HTTP, but the value of its "URL" parameter
is still a URI.

However, I looked for documentation on it and found examples in the Netscape
Navigator 4.0 HTML Tag Reference using single quotes. So I agree now, this
should be fixed.
I'll take this bug.

What the patch does is, after having found the start of the uri (skip a leading
" or ' if needed), find the end of the string or the first space before that and
strip off any trailing " or '. Note that this leaves any " or ' embedded in the
uri, so content="4; url='gz23'52,43'3,42,df.html'" will redirect you to the
relative uri gz23'52,43'3,42,df.html. This is what NS4 does. In the (IMO
unlikely) case where it needs to end with a ' or ", just escape it.

cc'ing rpotts for review.
Assignee: blakeross → disttsc
Component: Evangelism → HTML Element
QA Contact: zach → tever
Build ID: 2001050521 (0.9)
OS Linux

This also occurs at http://www.hotcopper.com.au/

To duplicate the error logging in is required but to save doing that the
following (as extracted from my cache) is the redirect....

<HTML>
<HEAD>
<META http-equiv="refresh"
content="0;URL='http://www.hotcopper.com.au/forum/html/forum_frame.boa'">
<LINK href="forumstyles.css" rel="stylesheet" type="text/css">
<TITLE>
Login OK
</TITLE>
</HEAD>
<BODY>
Click <a
href="http://www.hotcopper.com.au/forum/html/forum_frame.boa">here</a>
to switch to forum view if not taken
there automatically.
</BODY>
</HTML>

which will then display the following in the URL window..
http://as1.hotcopper.com.au/%27http://www.hotcopper.com.au/forum/html/forum_frame.boa%27

along with the following error page...

Not Found (404)
Original request:
/%27http://www.hotcopper.com.au/forum/html/forum_frame.boa%27

Not found request:
/%27http://www.hotcopper.com.au/forum/html/forum_frame.boa%27

r=rpotts
Mass move to jaggernaut@netscape.com
Assignee: jag → jaggernaut
-> 0.9.3, limbo
Target Milestone: --- → mozilla0.9.3
a= asa@mozilla.org for checkin to the trunk.
(on behalf of drivers)
Blocks: 83989
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
*** Bug 87286 has been marked as a duplicate of this bug. ***
Verified on:
build: 2001-07-02-04-Trunk
platform: WinNT

The above url loads fine.
Status: RESOLVED → VERIFIED
SPAM. HTML Element component deprecated, changing component to Layout. See bug
88132 for details.
Component: HTML Element → Layout
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: