Closed
Bug 75063
Opened 24 years ago
Closed 24 years ago
Typing mozilla.org\ gives unexpected results.
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.2
People
(Reporter: neil, Assigned: adamlock)
References
Details
Attachments
(4 files)
3.10 KB,
patch
|
Details | Diff | Splinter Review | |
3.05 KB,
patch
|
Details | Diff | Splinter Review | |
3.21 KB,
patch
|
Details | Diff | Splinter Review | |
3.29 KB,
patch
|
Details | Diff | Splinter Review |
If you type mozilla.org\ into the location bar and press enter, it selects the
ftp:// protocol and adds three forward slashes to the end.
file://mozilla.org///
And it also tries to display the www page as an FTP site. I don't know if this
is a bug, but I sure didn't expect that to happen.
Comment 1•24 years ago
|
||
over to Networking. In Linux build 040908 we escape the backslash and load the
page fine but not on win2K.
Assignee: asa → neeti
Status: UNCONFIRMED → NEW
Component: Browser-General → Networking: HTTP
Ever confirmed: true
QA Contact: doronr → tever
We are converting to file:// protocol in docshell\base\nsDefaultURIFixup.cpp in
nsDefaultURIFixup::CreateFixupURI(..)
Assignee: neeti → adamlock
Component: Networking: HTTP → Embedding: Docshell
The method nsDefaultURIFixup::ConvertFileToStringURI is doing the fixup. If it
sees a backslash in the string or the string length is 2 and the last char is a
colon or a bar then it converts it to a file URL.
This is meant to be smart behaviour to account for people typing file paths into
the address base. Perhaps it would be smarter it it worked on absolute paths
e.g. "c:\blah\" & "\somewhere" but "..\foo\" and "bar\" would be skipped. It
could even test if the file/dir actually exists.
Obviously this is all Win32 specific.
For some reason, the Unix version would turn this "\somepath" into this
"file://\somepath". Is this legal?
Backslashes are allowed in names, at least on Linux ext2 filesystems.
touch '\a\b.zz'
will create such a file so mozilla's behavior is correct on Linux.
Review please for the patch.
The patch turns the input URL into a file:// URL if it refers to an existing
file with an absolute path. So things like "c:\", "d:\mozilla\somefile.txt"
will be transformed into their "file://c|/" and
"file://d|/mozilla/somefile.txt" equivalents, but "mozilla.org\" will still turn
into "http://mozilla.org/".
Assignee | ||
Comment 10•24 years ago
|
||
Assignee | ||
Comment 11•24 years ago
|
||
r=valeski
Comment 12•24 years ago
|
||
sr=rpotts
Assignee | ||
Comment 13•24 years ago
|
||
Thanks everyone, fix is checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 14•24 years ago
|
||
Filed bug 81717 for this still happening for data: (and finger:) urls.
Comment 15•23 years ago
|
||
qa to me.
+verifyme (will verify when I do all 0.9.x fixes)
Keywords: verifyme
QA Contact: tever → benc
Comment 16•22 years ago
|
||
Is this windows-only behavior?
You need to log in
before you can comment on or make changes to this bug.
Description
•