urinorm.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. Already normal form
  2. http://example.com/
  3. http://example.com/
  4. Add a trailing slash
  5. http://example.com
  6. http://example.com/
  7. Remove an empty port segment
  8. http://example.com:/
  9. http://example.com/
  10. Remove a default port segment
  11. http://example.com:80/
  12. http://example.com/
  13. Capitalization in host names
  14. http://wWw.exaMPLE.COm/
  15. http://www.example.com/
  16. Capitalization in scheme names
  17. htTP://example.com/
  18. http://example.com/
  19. Capitalization in percent-escaped reserved characters
  20. http://example.com/foo%2cbar
  21. http://example.com/foo%2Cbar
  22. Unescape percent-encoded unreserved characters
  23. http://example.com/foo%2Dbar%2dbaz
  24. http://example.com/foo-bar-baz
  25. remove_dot_segments example 1
  26. http://example.com/a/b/c/./../../g
  27. http://example.com/a/g
  28. remove_dot_segments example 2
  29. http://example.com/mid/content=5/../6
  30. http://example.com/mid/6
  31. remove_dot_segments: single-dot
  32. http://example.com/a/./b
  33. http://example.com/a/b
  34. remove_dot_segments: double-dot
  35. http://example.com/a/../b
  36. http://example.com/b
  37. remove_dot_segments: leading double-dot
  38. http://example.com/../b
  39. http://example.com/b
  40. remove_dot_segments: trailing single-dot
  41. http://example.com/a/.
  42. http://example.com/a/
  43. remove_dot_segments: trailing double-dot
  44. http://example.com/a/..
  45. http://example.com/
  46. remove_dot_segments: trailing single-dot-slash
  47. http://example.com/a/./
  48. http://example.com/a/
  49. remove_dot_segments: trailing double-dot-slash
  50. http://example.com/a/../
  51. http://example.com/
  52. Test of all kinds of syntax-based normalization
  53. hTTPS://a/./b/../b/%63/%7bfoo%7d
  54. https://a/b/c/%7Bfoo%7D
  55. Unsupported scheme
  56. ftp://example.com/
  57. fail
  58. Non-absolute URI
  59. http:/foo
  60. fail
  61. Illegal character in URI
  62. http://<illegal>.com/
  63. fail
  64. Non-ascii character in URI
  65. http://foo.com/
  66. fail