On Thu, Jun 27, 2019 at 11:57 PM Ken Brown wrote: > 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:/// https://tools.ietf.org/html/rfc8089 Appendix B. Example URIs > The syntax in Section 2 is intended to support file URIs that take > the following forms: > Local files: > o A traditional file URI for a local file with an empty authority. > This is the most common format in use today. For example: > * "file:///path/to/file" https://en.wikipedia.org/wiki/File_URI_scheme#How_many_slashes? * A valid file URI must therefore begin with either file:/path, > file:///path or file://hostname/path. > * file://path (i.e. two slashes, without a hostname) is never correct, but > is often used. 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.