representing UNC as a URI

Hi,

I am trying to find the best way to represent a windows
share UNC as a file:// URI  and am not having much luck
finding a definite example on the net so I hope here is a
good place to ask.

If I have a windows share called //myshare/mydir

then in windows explorer typing both of these in to the
address bar resolves to the correct location

file:////myshare/mydir
file://myshare/mydir

but the path segment of these is different and the
file://myshare/mydir is only valid with regard to computers
that are in the same windows domain.

also if I use  file:////myshare/mydir then the current rfc
tells me that if there is no authority then //authority can
be removed with would leave with  file://myshare/mydir witch
is not the same URI.

Also the ABNF has the rule
path-abs        ; begins with "/" but not "//"
witch I guess should prevent the above from happening.


I am guessing the answer should be that //myshare/mydir
should be considered a path-abempty and so I should use
file:////myshare/mydir and don't remove // empty authority
if the path starts with // when writing out the complete URI

Is this correct?

thanks

pascal

Received on Tuesday, 11 May 2004 05:12:52 UTC