server server/ server/maybe_file server/directory/ server.com server.com/ server.com/maybe_file server.com/directory/ # http:server ... should not be allowed c:/foo.txt c:\foo.txt c:/foo.txt # /usr/local/bin ... doesn't pass. it is critical problem of MS.NET \\server # ///server ... this became UNC server name in MS.NET server server/ server/maybe_file server/directory/ server.com ## below should be treated as UNC server readme.txt server.com/ # file:server.com # file:server.com/ # file:server server.com/maybe_file server.com/directory/ ## Below are taken from UriTest.cs contoso.com?subject=uri mailto:user:pwd@contoso.com?subject=uri \\myserver\mydir\mysubdir\myfile.ext www.contoso.com www.contoso.com/foo/bar/index.html?x=0 c:\tmp\hello.txt # //////cygwin/tmp/hello.txt : it became impossible mymachine/cygwin/tmp/hello.txt # ///c:/cygwin/tmp/hello.txt one_file.txt cygwin/tmp/hello.txt server/filename.ext \\server\share\filename.ext 1.2.3.4 1.2.3.4 # file: # http: # makefile # gopher: # ftp: # file:/ # # / ... however, should be allowed in Unix file path. # \ # c: # /c: ... however, should be allowed in Windows file path. # news: ... in fact MS passes this. # Below should be allowed localhost/c# localhost/c#bookmark localhost/c# # this passes... it breaks RFC 2396 rule. c# mailto:c# c#bookmark # # non-standard scheme # urn:mono-uri-test # This "8080" is not a port specifier. This is "opaque part" (RFC 2396) urn:mono-uri-test:8080 # But here, it is interpreted as a host name. urn://mono-uri-test:8080 # Scheme cannot start with non-alphabetic character, but MS fails to reject ファイル:myserver/foo.txt ファイル://myserver/foo.txt 辭典://cn_to_ja/ # # still looks TODO (EscapeString) # web.app.com/test.cgi?value=あいうえお 辭典:cn_to_ja/ファイル ファイル: 辭典: # # # below should not be allowed but MS passes. c:/c# # # # MS.NET supplies no host info (consoto.com), but I think Mono is better. # news:123456@contoso.com # # MS handles it as http, but it is inconsistent with \\server as file. # //server # //localhost/c#