urlparse.dat 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # Any blank lines and those beginning with # are comments and
  2. # ignored. To add additional test cases that could potentially
  3. # break URL parsing in mozilla add the input URL on a new line
  4. # and follow it with the expected output for the standard URL
  5. # parser and one line for the case when the URL is really
  6. # created. Then run urltest with the -std option and without it
  7. # on this file and hopefully the expected output should match
  8. # the one from the program.
  9. # - Gagan Saksena 03/28/00
  10. #
  11. http://username:password@hostname.com:80/pathname/./more/stuff/../path
  12. http,username,password,hostname.com,80,/pathname/more/,path,,,,,http://username:password@hostname.com:80/pathname/more/path
  13. http,username,password,hostname.com,80,/pathname/more/,path,,,,,http://username:password@hostname.com/pathname/more/path
  14. username@host:8080/path
  15. ,username,,host,8080,/,path,,,,,username@host:8080/path
  16. Can not create URL
  17. http://gagan/
  18. http,,,gagan,-1,/,,,,,,http://gagan/
  19. http,,,gagan,-1,/,,,,,,http://gagan/
  20. scheme:host/netlib
  21. scheme,,,host,-1,/,netlib,,,,,scheme://host/netlib
  22. Can not create URL
  23. mailbox:///foo
  24. mailbox,,,,-1,/,foo,,,,,mailbox:///foo
  25. mailbox,,,,-1,/,foo,,,,,mailbox:///foo
  26. scheme:user@hostname.edu:80/pathname
  27. scheme,user,,hostname.edu,80,/,pathname,,,,,scheme://user@hostname.edu:80/pathname
  28. Can not create URL
  29. http://username:password@hostname:80/pathname
  30. http,username,password,hostname,80,/,pathname,,,,,http://username:password@hostname:80/pathname
  31. http,username,password,hostname,80,/,pathname,,,,,http://username:password@hostname/pathname
  32. http://username:password@hostname:8080/path/filebasename.fileextension;param?query#ref
  33. http,username,password,hostname,8080,/path/,filebasename,fileextension,param,query,ref,http://username:password@hostname:8080/path/filebasename.fileextension;param?query#ref
  34. http,username,password,hostname,8080,/path/,filebasename,fileextension,param,query,ref,http://username:password@hostname:8080/path/filebasename.fileextension;param?query#ref
  35. resource:/pathname
  36. resource,,,,-1,/,pathname,,,,,resource:///pathname
  37. resource,,,,-1,/,pathname,,,,,resource:///pathname
  38. ftp://uname%here.com:pwd@there.com/aPath/a.html
  39. ftp,uname%here.com,pwd,there.com,-1,/aPath/,a,html,,,,ftp://uname%here.com:pwd@there.com/aPath/a.html
  40. ftp,uname%here.com,pwd,there.com,-1,/aPath/,a,html,,,,ftp://uname%here.com:pwd@there.com/aPath/a.html
  41. http://www.inf.bme.hu?foo=bar
  42. http,,,www.inf.bme.hu,-1,/,,,,foo=bar,,http://www.inf.bme.hu/?foo=bar
  43. http,,,www.inf.bme.hu,-1,/,,,,foo=bar,,http://www.inf.bme.hu/?foo=bar
  44. http://test.com/aPath/a.html#/1/2
  45. http,,,test.com,-1,/aPath/,a,html,,,/1/2,http://test.com/aPath/a.html#/1/2
  46. http,,,test.com,-1,/aPath/,a,html,,,/1/2,http://test.com/aPath/a.html#/1/2
  47. http://user:pass@ipaddres:2/get?foo/something
  48. http,user,pass,ipaddres,2,/,get,,,foo/something,,http://user:pass@ipaddres:2/get?foo/something
  49. http,user,pass,ipaddres,2,/,get,,,foo/something,,http://user:pass@ipaddres:2/get?foo/something
  50. # testing different versions of http urls
  51. http:www.mozilla.org
  52. http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/
  53. http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/
  54. http:/www.mozilla.org
  55. http,,,,-1,/,www.mozilla,org,,,,http:///www.mozilla.org
  56. http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/
  57. # testing cap letters (23927)
  58. HtTp://wWw.mozilLa.org
  59. http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/
  60. http,,,www.mozilla.org,-1,/,,,,,,http://www.mozilla.org/
  61. # testing spaces (15150)
  62. go.com.au?mozilla bug reports
  63. ,,,go.com.au,-1,/,,,,mozilla%20bug%20reports,,go.com.au/?mozilla%20bug%20reports
  64. Can not create URL
  65. http://go.com.au?mozilla bug reports
  66. http,,,go.com.au,-1,/,,,,mozilla%20bug%20reports,,http://go.com.au/?mozilla%20bug%20reports
  67. http,,,go.com.au,-1,/,,,,mozilla%20bug%20reports,,http://go.com.au/?mozilla%20bug%20reports
  68. # testing for multiple params (14801)
  69. http://ad.doubleclick.net/ad/cbsmw.button.com/SIDEBAR_BUTTONS;sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414
  70. http,,,ad.doubleclick.net,-1,/ad/cbsmw.button.com/,SIDEBAR_BUTTONS,,sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414,,,http://ad.doubleclick.net/ad/cbsmw.button.com/SIDEBAR_BUTTONS;sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414
  71. http,,,ad.doubleclick.net,-1,/ad/cbsmw.button.com/,SIDEBAR_BUTTONS,,sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414,,,http://ad.doubleclick.net/ad/cbsmw.button.com/SIDEBAR_BUTTONS;sz=88x31;kw=DBCC;tile=4;ord=1864641213378545414
  72. fxqn:/us/va/reston/cnri/ietf/24/asdf%*.fred
  73. fxqn,,,,-1,/us/va/reston/cnri/ietf/24/,asdf%*,fred,,,,fxqn:///us/va/reston/cnri/ietf/24/asdf%*.fred
  74. Can not create URL
  75. news:3B5C133C.2080505@foobar.net
  76. news,3B5C133C.2080505,,foobar.net,-1,/,,,,,,news://3B5C133C.2080505@foobar.net/
  77. news,3B5C133C.2080505,,foobar.net,-1,/,,,,,,news://3B5C133C.2080505@foobar.net/
  78. http://host/path/%2E%2E/file%2Ehtml
  79. http,,,host,-1,/,file%2Ehtml,,,,,http://host/file%2Ehtml
  80. http,,,host,-1,/,file%2Ehtml,,,,,http://host/file%2Ehtml