1Testing ff_url_decompose: 2 3http://user:pass@ffmpeg:8080/dir/file?query#fragment => 4 scheme: http: 5 authority: // 6 userinfo: user:pass@ 7 host: ffmpeg 8 port: :8080 9 path: /dir/file 10 query: ?query 11 fragment: #fragment 12 13http://ffmpeg/dir/file => 14 scheme: http: 15 authority: // 16 host: ffmpeg 17 path: /dir/file 18 19file:///dev/null => 20 scheme: file: 21 authority: // 22 path: /dev/null 23 24file:/dev/null => 25 scheme: file: 26 path: /dev/null 27 28http://[::1]/dev/null => 29 scheme: http: 30 authority: // 31 host: [::1] 32 path: /dev/null 33 34http://[::1]:8080/dev/null => 35 scheme: http: 36 authority: // 37 host: [::1] 38 port: :8080 39 path: /dev/null 40 41//ffmpeg/dev/null => 42 authority: // 43 host: ffmpeg 44 path: /dev/null 45 46test?url=http://server/path => 47 path: test 48 query: ?url=http://server/path 49 50dummy.mp4#t=0:02:00,121.5 => 51 path: dummy.mp4 52 fragment: #t=0:02:00,121.5 53 54Testing ff_make_absolute_url: 55 (null) baz => baz 56 /foo/bar baz => /foo/baz 57 /foo/bar ../baz => /foo/../baz 58 /foo/bar /baz => /baz 59 /foo/bar ../../../baz => /foo/../../../baz 60 http://server/foo/ baz => http://server/foo/baz 61 http://server/foo/bar baz => http://server/foo/baz 62 http://server/foo/ ../baz => http://server/baz 63 http://server/foo/bar/123 ../../baz => http://server/baz 64 http://server/foo/bar/123 /baz => http://server/baz 65 http://server/foo/bar/123 https://other/url => https://other/url 66 http://server/foo/bar?param=value/with/slashes /baz => http://server/baz 67 http://server/foo/bar?param&otherparam ?someparam => http://server/foo/bar?someparam 68 http://server/foo/bar //other/url => http://other/url 69 http://server/foo/bar ../../../../../other/url => http://server/other/url 70 http://server/foo/bar /../../../../../other/url => http://server/other/url 71 http://server/foo/bar /test/../../../../../other/url => http://server/other/url 72 http://server/foo/bar /test/../../test/../../../other/url => http://server/other/url 73 http://server/foo/bar file:../baz/qux => file:../baz/qux 74 http://server/foo//bar/ ../../ => http://server/foo/ 75 file:../tmp/foo ../bar/ => file:../tmp/../bar/ 76 file:../tmp/foo file:../bar/ => file:../bar/ 77 http://server/foo/bar ./ => http://server/foo/ 78 http://server/foo/bar .dotfile => http://server/foo/.dotfile 79 http://server/foo/bar ..doubledotfile => http://server/foo/..doubledotfile 80 http://server/foo/bar double..dotfile => http://server/foo/double..dotfile 81 http://server/foo/bar doubledotfile.. => http://server/foo/doubledotfile.. 82 file1 file2 => file2 83 dir/file1 file2 => dir/file2 84 dir/file1 ../file2 => dir/../file2 85 dir\file1 file2 => file2 86 dir\file1 file2 DOS dir\file2 87 \\srv\shr\file ..\..\dummy => ..\..\dummy 88 \\srv\shr\file ..\..\dummy DOS \\srv\shr\..\..\dummy 89 \\srv\shr\file dummy => dummy 90 \\srv\shr\file dummy DOS \\srv\shr\dummy 91 \\srv\shr\file \\srv2\shr2\file2 => \\srv2\shr2\file2 92 \\srv\shr\file d:/file => d:/file 93 C:\dir\a ..\file => C:..\file 94 C:\dir\a ..\file DOS C:\dir\..\file 95 C:\dir\a \\srv\shr\file => C:\\srv\shr\file 96 C:\dir\a \\srv\shr\file DOS \\srv\shr\file 97 C:\dir\a d:\file => d:\file 98 http://a/b \\srv\shr\file => http://a/\\srv\shr\file 99 http://a/b //srv/shr/file => http://srv/shr/file 100 http://a/b d:\file => d:\file 101 http://a/b C:/file => C:/file 102 http://a/b/c/d;p?q g:h => g:h 103 http://a/b/c/d;p?q g => http://a/b/c/g 104 http://a/b/c/d;p?q ./g => http://a/b/c/g 105 http://a/b/c/d;p?q g/ => http://a/b/c/g/ 106 http://a/b/c/d;p?q /g => http://a/g 107 http://a/b/c/d;p?q //g => http://g 108 http://a/b/c/d;p?q ?y => http://a/b/c/d;p?y 109 http://a/b/c/d;p?q g?y => http://a/b/c/g?y 110 http://a/b/c/d;p?q #s => http://a/b/c/d;p?q#s 111 http://a/b/c/d;p?q g#s => http://a/b/c/g#s 112 http://a/b/c/d;p?q g?y#s => http://a/b/c/g?y#s 113 http://a/b/c/d;p?q ;x => http://a/b/c/;x 114 http://a/b/c/d;p?q g;x => http://a/b/c/g;x 115 http://a/b/c/d;p?q g;x?y#s => http://a/b/c/g;x?y#s 116 http://a/b/c/d;p?q => http://a/b/c/d;p?q 117 http://a/b/c/d;p?q . => http://a/b/c/ 118 http://a/b/c/d;p?q ./ => http://a/b/c/ 119 http://a/b/c/d;p?q .. => http://a/b/ 120 http://a/b/c/d;p?q ../ => http://a/b/ 121 http://a/b/c/d;p?q ../g => http://a/b/g 122 http://a/b/c/d;p?q ../.. => http://a/ 123 http://a/b/c/d;p?q ../../ => http://a/ 124 http://a/b/c/d;p?q ../../g => http://a/g 125 http://a/b/c/d;p?q ../../../g => http://a/g 126 http://a/b/c/d;p?q ../../../../g => http://a/g 127 http://a/b/c/d;p?q /./g => http://a/g 128 http://a/b/c/d;p?q /../g => http://a/g 129 http://a/b/c/d;p?q g. => http://a/b/c/g. 130 http://a/b/c/d;p?q .g => http://a/b/c/.g 131 http://a/b/c/d;p?q g.. => http://a/b/c/g.. 132 http://a/b/c/d;p?q ..g => http://a/b/c/..g 133 http://a/b/c/d;p?q ./../g => http://a/b/g 134 http://a/b/c/d;p?q ./g/. => http://a/b/c/g/ 135 http://a/b/c/d;p?q g/./h => http://a/b/c/g/h 136 http://a/b/c/d;p?q g/../h => http://a/b/c/h 137 http://a/b/c/d;p?q g;x=1/./y => http://a/b/c/g;x=1/y 138 http://a/b/c/d;p?q g;x=1/../y => http://a/b/c/y 139 http://a/b/c/d;p?q g?y/./x => http://a/b/c/g?y/./x 140 http://a/b/c/d;p?q g?y/../x => http://a/b/c/g?y/../x 141 http://a/b/c/d;p?q g#s/./x => http://a/b/c/g#s/./x 142 http://a/b/c/d;p?q g#s/../x => http://a/b/c/g#s/../x 143 144Testing av_url_split: 145/foo/bar => -1 /foo/bar 146http://server/foo/ => http server -1 /foo/ 147http://example.com/foo/bar => http example.com -1 /foo/bar 148http://user:pass@localhost:8080/foo/bar/123 => http user:pass localhost 8080 /foo/bar/123 149http://server/foo/bar?param=value/with/slashes => http server -1 /foo/bar?param=value/with/slashes 150https://1l-lh.a.net/i/1LIVE_HDS@179577/master.m3u8 => https 1l-lh.a.net -1 /i/1LIVE_HDS@179577/master.m3u8 151ftp://u:p%2B%2F2@ftp.pbt.com/ExportHD.mpg => ftp u:p%2B%2F2 ftp.pbt.com -1 /ExportHD.mpg 152https://key.dns.com?key_id=2&model_id=12345&&access_key= => https key.dns.com -1 ?key_id=2&model_id=12345&&access_key= 153http://example.com#tag => http example.com -1 #tag 154