On Thu, Jun 27, 2019 at 11:57 PM Ken Brown <address@hidden
> This change causes the test to fail on Cygwin. I think the original "file://"
> is the correct prefix. If concatenated with "/some/file", it yields the URL
> "file:///some/file". Your version with "file:///" as the prefix yields
> "file:////some/file", which would refer to a local file "//some/file".
It's a long-standing issue. The standard says that two slashes are to be followed by a hostname, Three slashes, if there's no hostname.
So, in fact, Posix apps should strip the initial slash of an absolute pathname before concatenating it to file:///
Appendix B. Example URIs
The syntax in Section 2 is intended to support file URIs that take
the following forms:
o A traditional file URI for a local file with an empty authority.
This is the most common format in use today. For example:
The test, as it is now, works for the native Windows port and fails for the Cygwin port. So to work on both, some special-casing will have to be done.
Note that file:/// is already used in several places in the sources.
> Posix says that the meaning of a path name starting with exactly two slashes is
> implementation-defined. On Cygwin, it's interpreted as a UNC path name,
> referring to a file on a network.
This is not about Posix pathnames, but RFC8089 URI schemes.