# # Test Suite for Uniform Resource Identifier Syntax # $Id: url_grammar.tests,v 1.5 1994/05/11 22:37:11 connolly Exp $ # # NOTES, RECENT CHANGES # # * The data character set is taken from the isAcceptable table in HTParse.c # in the libwww distribution # * '=' and ';' have been added as markup characters in order to support # an experimental keyword=value syntax # # * I suggest we adopt the scheme "anon-ftp" as per MIME. # # * The syntax ftp://user:passwd@host.com/foo.bar has been changed to # ftp://user*passwd@host.com/foo.bar # to make the grammar workable. # Note that the user/passwd mechanism is specific to FTP, and opaque to # the URI syntax. # # * Could somebody add some test cases for typical CGI script invocation # URLs? Should the parameter syntax be opaque to the URI syntax, or # should it use the experimental keyword=value syntax or something? # # * Given the proposed semantics of the "mailto" scheme, # (see # wouldn't "mailbox" be a better name? # # TEST SUITE FORMAT # Each line is a test case, with 1 or 2 tab-delimited fields: # there here # (HREF/SRC) (BASE) # (relative parsing not supported for grammar testing) # # # Lexical Issue Tests: # # minimal URL: x-url-scheme:/name # minimal URN: x-urn-scheme:name # minimal URI name x-scheme:foo # character set testing: # strange scheme name: x-test-scheme-*.0-9@A-Z_a-z:/name # strange file name(s): x-test-scheme:/-*.0-9@A-Z_a-z x-test-scheme:/-*.0-9@A-Z_a-z/-*.0-9@A-Z_a-z # strange host name: x-test-scheme://-*.0-9@A-Z_a-z/ # strange fragment id: x-test-scheme://host/dir/file#-*.0-9@A-Z_a-z # quoting in host name (???): x-test-scheme://slash%3D%2F/ # quoting in port (???): x-test-scheme://host:slash%3D%2F/ # quoting in file name(s): x-test-scheme:/slash%3D%2F x-test-scheme:/slash%3D%2F/slash%3D%2F # quoting in parameters x-test-scheme:/path;slash%3D%2F=slash%3D%2F;slash2%3D%2F=slash2%3D%2F x-test-scheme:/database?slash%3D%2F=slash%3D%2F;slash2%3D%2F=slash2%3D%2F # quoting in search words x-test-scheme:/database?slash%3D%2F+slash%3D%2F+slash2%3D%2F+slash2%3D%2F # quoting in fragment id: x-test-scheme://host/dir/file#slash%3D%2F # # Representation of contemporary resources # # local files: local-file:/etc/motd # extensions are opaque to the syntax. local-file:/u/connolly/xxx.ps local-file://ulua.hal.com/u/connolly/xxx.ps # directories local-file://foo.com/ local-file:/etc/ # relative path to file ../foo.html local-file:/dir1/dir2 ../dir/foo.html local-file:/dir1/dir2 # fragment of relative file ../dir/foo.html#part1 local-file:/dir1/dir2 # relative path to dir ../other/dir/ local-file:/dir1/dir2 # ftp: # directory: anon-ftp://info.cern.ch/pub/ # software distribution: anon-ftp://info.cern.ch/WWW/contrib/foo.tar.Z # user, password (opaque to the URI syntax) ftp://user@info.cern.ch/WWW/contrib/foo.tar.Z # ??? The user:passord syntax couldn't be worked into the syntax. # I suggest the use of * instead. ftp://user*passwd@info.cern.ch/WWW/contrib/foo.tar.Z # http: # The archtypical URI http://info.cern.ch/default.html # port variations http://host.com:100/default.html # format variations (opaque to the URI syntax) http://host.com:10/file.txt # A searchable database http://host.com/database? # searching http://host.com/database?word http://host.com/database?word1+word2 http://host.com/database?word1+word2+word%2A%3A33 # HTTP script stuff? ISMAP stuff? other tests? # Gopher site gopher://host.org/ # Gopher dir gopher://host.org/7About%20This%20Gopher # Gopher file gopher://host.org/11/stuff/README # Gopher image gopher://host.org/II/stuff/foo.gif # ???Hmmm... how to represent the whole namespace of content-types in gopher? # Gopher search gopher://host.org/7database?word%20word2 gopher://host.org/7database?word+word2 # see url_ideas.tests for WAIS "file" representation # WAIS database wais://ifi.uio.no/comp.text.sgml? # WAIS source??? # Mailto # ??? I would suggest mailbox in stead mailto:connolly@hal.com x-mailbox:connolly@hal.com # News # newsgroup news:comp.infosystems.www # message news:June-21.12312@ulua.hal.com # message # relative message-id June-12.foobar@ulua message-id:1234 # Prospero??? #Date: Mon, 25 Apr 1994 09:46:56 +0200 #Message-Id: <447*/S=hille/OU=rz/OU=informatik/PRMD=uni-hamburg/ADMD=d400/C=de/@MHS> #From: Gunter #To: Multiple recipients of list #Subject: Who can express URL syntax with BNF # #No, I did not read the www-talk archive. But the parser of my HTTP server #for Windows will be an ugly piece of code, if it cannot decide what to do: # # seems to be a form, handled specially http://host/1234?Name=foo;Age=21 # is a form or a textsearch http://host/1234?Name=foo # is a textsearch http://host/1234?Name+foo # is a textsearch as well? http://host/1234?Name%20foo # is a specejump (or textsearch?) http://host/1234?777,888 # #HTTP protocol states that spacejump and textsearch methods are done via GET. #Why don't we use SPACEJUMP or TEXTSEARCH to disambiguate our syntax? # #Gunter