Closed Bug 181732 Opened 23 years ago Closed 19 years ago

nordic mtv site produces "is not a valid protocol"

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bugzilla, Unassigned)

References

()

Details

Attachments

(1 file)

going to http://www.nordic.mtve.com/mapnext.asp with a clean profile produces the following alert "is not a valid protocol" it's because of the document.location.href=""; IE handles this fine... 20021122
This is a regression from bug 86486. The reason seems indeed to be the document.location.href is set to "" (see source below). I don't know why they can't use a real redirect or a meta-refresh. <head>CRLF <title>...loading</title>CRLF <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">CRLF <meta http-equiv="Set-Cookie" content="country=undefined;path=/;expires=Mon, 20 Nov 2004 01:01:01 +0100">CRLF </head>CRLF <body bgcolor="#ffffff">CRLF <SCRIPT LANGUAGE="JavaScript">CRLF <!--CRLF document.location.href = "";CRLF // -->CRLF </SCRIPT>CRLF <div align="center">CRLF <p>&nbsp;</p>CRLF <p>&nbsp;</p>CRLF <p><img src="http://www.mtve.com/images/justasec.gif" width="170" height="28"></p>CRLF </div>CRLF </html
Mine.
Assignee: darin → bzbarsky
OS: Windows 2000 → All
Hardware: PC → All
So... here is the deal. We call nsIOService::NewURI with a spec of "" and a base uri of whatever the page's URI is. ExtractScheme() fails, but we have a base uri, so we go with the "http" protocol handler and call nsHttpHandler::NewURI with those spec and base. This creates an nsStandardURL and calls Init() on it with those spec and base. if (spec.IsEmpty()) { Clear(); return NS_OK; } is what nsStandardURL does. Is that really what it should be doing in cases when the base is non-null? If so, I can add a check for empty spec in nsLocation::SetHref that will just ignore empty specs... Darin?
bz: looks like nsStandardURL::Init is wrong. in fact, the IsEmpty test is not needed.
Comment on attachment 107294 [details] [diff] [review] v1 patch: remove IsEmpty test yep. that makes us act like NS4.
Attachment #107294 - Flags: superreview+
back to darin. ;)
Assignee: bzbarsky → darin
Attachment #107294 - Flags: review?(andreas.otte)
Comment on attachment 107294 [details] [diff] [review] v1 patch: remove IsEmpty test looks good to me
Attachment #107294 - Flags: review?(andreas.otte) → review+
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.3alpha
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: Networking: HTTP → Networking
QA Contact: httpqa → benc
Reopening. I cannot reach the site with the Dec 13 Win2000 trunk build. The page never loads, though it does in 4.8 and IE6.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
untargeted for now.
Target Milestone: mozilla1.3alpha → ---
-> default owner
Assignee: darin → nobody
Status: REOPENED → NEW
QA Contact: benc → networking
this was fixed with the checkin long time ago
Status: NEW → RESOLVED
Closed: 23 years ago19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: