You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.6KB

  1. Testing ff_url_decompose:
  2. http://user:pass@ffmpeg:8080/dir/file?query#fragment =>
  3. scheme: http:
  4. authority: //
  5. userinfo: user:pass@
  6. host: ffmpeg
  7. port: :8080
  8. path: /dir/file
  9. query: ?query
  10. fragment: #fragment
  11. http://ffmpeg/dir/file =>
  12. scheme: http:
  13. authority: //
  14. host: ffmpeg
  15. path: /dir/file
  16. file:///dev/null =>
  17. scheme: file:
  18. authority: //
  19. path: /dev/null
  20. file:/dev/null =>
  21. scheme: file:
  22. path: /dev/null
  23. http://[::1]/dev/null =>
  24. scheme: http:
  25. authority: //
  26. host: [::1]
  27. path: /dev/null
  28. http://[::1]:8080/dev/null =>
  29. scheme: http:
  30. authority: //
  31. host: [::1]
  32. port: :8080
  33. path: /dev/null
  34. //ffmpeg/dev/null =>
  35. authority: //
  36. host: ffmpeg
  37. path: /dev/null
  38. Testing ff_make_absolute_url:
  39. (null) baz => baz
  40. /foo/bar baz => /foo/baz
  41. /foo/bar ../baz => /baz
  42. /foo/bar /baz => /baz
  43. /foo/bar ../../../baz => /baz
  44. http://server/foo/ baz => http://server/foo/baz
  45. http://server/foo/bar baz => http://server/foo/baz
  46. http://server/foo/ ../baz => http://server/baz
  47. http://server/foo/bar/123 ../../baz => http://server/baz
  48. http://server/foo/bar/123 /baz => http://server/baz
  49. http://server/foo/bar/123 https://other/url => https://other/url
  50. http://server/foo/bar?param=value/with/slashes /baz => http://server/baz
  51. http://server/foo/bar?param&otherparam ?someparam => http://server/foo/bar?someparam
  52. http://server/foo/bar //other/url => http://other/url
  53. http://server/foo/bar ../../../../../other/url => http://server/other/url
  54. http://server/foo/bar /../../../../../other/url => http://server/other/url
  55. http://server/foo/bar /test/../../../../../other/url => http://server/other/url
  56. http://server/foo/bar /test/../../test/../../../other/url => http://server/other/url
  57. Testing av_url_split:
  58. /foo/bar => -1 /foo/bar
  59. http://server/foo/ => http server -1 /foo/
  60. http://example.com/foo/bar => http example.com -1 /foo/bar
  61. http://user:pass@localhost:8080/foo/bar/123 => http user:pass localhost 8080 /foo/bar/123
  62. http://server/foo/bar?param=value/with/slashes => http server -1 /foo/bar?param=value/with/slashes
  63. https://1l-lh.a.net/i/1LIVE_HDS@179577/master.m3u8 => https 1l-lh.a.net -1 /i/1LIVE_HDS@179577/master.m3u8
  64. ftp://u:p%2B%2F2@ftp.pbt.com/ExportHD.mpg => ftp u:p%2B%2F2 ftp.pbt.com -1 /ExportHD.mpg
  65. https://key.dns.com?key_id=2&model_id=12345&&access_key= => https key.dns.com -1 ?key_id=2&model_id=12345&&access_key=
  66. http://example.com#tag => http example.com -1 #tag