URLs with UNC paths with forward slashes don't load

VERIFIED DUPLICATE of bug 66194

Status

()

Core
Networking: File
VERIFIED DUPLICATE of bug 66194
17 years ago
16 years ago

People

(Reporter: JD Brennan, Assigned: dougt)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9) Gecko/20010505
BuildID:    2001050515

URLs of this form  file://host/share/file.html cause Mozilla to
do nothing.   The icon animates and the status bar animates,
but the page never loads.  The URL file:\\host\share\file.html
gets rewritten as file://///host/share/file.html and loads
correctly.  (The 5 slashes seem odd, but that's probably a
nother bug).  Although perhaps not technically a correct URL,
IE5 and Netscape 4 both support this syntax and there are
many web pages (on intranets) that use this.

Reproducible: Always
Steps to Reproduce:
1. Create a file foo.html on your NT box in C:\TEMP
2. Create a share called TEMP that shares C:\TEMP
3. Try to open file://<your machine>//temp/foo.html


Actual Results:  Browser never displayed foo.html
Icon's animated, but nothing else happened

Expected Results:  The foo.html page to display in the browser

I noticed this when trying to click a link on a page
that had a URL of this format, but it's easier to reproduce
by opening the URL directly.

Comment 1

17 years ago
.
Assignee: asa → dougt
Component: Browser-General → Networking: File
QA Contact: doronr → tever
Whiteboard: DUPEME

Comment 2

17 years ago
dupe of 70871 perhaps
(Reporter)

Comment 3

17 years ago
I think this is different than <a 
href="http://bugzilla.mozilla.org/show_bug.cgi?id=70871">70871</a>, 
which is about Linux.  What does //server/dir/file.txt mean on Linux?
At a shell prompt if I do

ls //server/dir/file.txt

I get 'No such file or directory'.   Is this supposed to be a Linux short hand 
for the NFS share dir on machine server?  I suspect Mozilla is doing
the correct thing by ignoring the server name in file://server on Linux
because I can't think of any common interpretation of it.

This PR is about Windows UNC paths, which are typically written
with back slashes.  You can do

dir \\server\dir\file.txt

in a Command Prompt on windows and that works fine
if machine server has a share dir for a directory that has
file.txt in it.

For historical reasons that I don't understand, IE and NS4
Accept file://server/dir/file.txt as well as file:\\server\dir\file.txt,
so web page authors (or maybe their authoring tools) insert
these kinds of links - I see them often on our intranet.

Comment 4

17 years ago

*** This bug has been marked as a duplicate of 66194 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Keywords: verifyme
Resolution: --- → DUPLICATE
Whiteboard: DUPEME

Comment 5

17 years ago
vrfy dup
Status: RESOLVED → VERIFIED
Keywords: verifyme

Comment 6

16 years ago
file://///host/share/file.html is the correct format.

For now, having text between the 2nd and 3rd slash is not working. In theory, it 
should support HOSTNAME (of your system) or "localhost" or VOID. That is the 
topic of bug 70871.

re: what it means in Linux

file URLs are inherently local, have no host-host portability, much less OS-OS.

file://server/dir/file.txt - not legal, although it might have worked at some 
time, I'm still investigating.

file:\\server\dir\file.txt - not legal b/c the slashes are wrong, auto 
conversion was pondered for all URLs in bug 32895, and in bug 93197, some auto 
conversion for JUST file in JUST Windows is pondered...

If you know what tools are creating these file URLs, I would appreciate a bug in 
"Networking: File" against each authoring tool.
You need to log in before you can comment on or make changes to this bug.