1 Testing ff_url_decompose:
3 http://user:pass@ffmpeg:8080/dir/file?query#fragment =>
13 http://ffmpeg/dir/file =>
28 http://[::1]/dev/null =>
34 http://[::1]:8080/dev/null =>
46 test?url=http://server/path =>
48 query: ?url=http://server/path
50 dummy.mp4#t=0:02:00,121.5 =>
52 fragment: #t=0:02:00,121.5
54 Testing ff_make_absolute_url:
56 /foo/bar baz => /foo/baz
57 /foo/bar ../baz => /foo/../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..
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
144 Testing av_url_split:
145 /foo/bar => -1 /foo/bar
146 http://server/foo/ => http server -1 /foo/
147 http://example.com/foo/bar => http example.com -1 /foo/bar
148 http://user:pass@localhost:8080/foo/bar/123 => http user:pass localhost 8080 /foo/bar/123
149 http://server/foo/bar?param=value/with/slashes => http server -1 /foo/bar?param=value/with/slashes
150 https://1l-lh.a.net/i/1LIVE_HDS@179577/master.m3u8 => https 1l-lh.a.net -1 /i/1LIVE_HDS@179577/master.m3u8
151 ftp://u:p%2B%2F2@ftp.pbt.com/ExportHD.mpg => ftp u:p%2B%2F2 ftp.pbt.com -1 /ExportHD.mpg
152 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=
153 http://example.com#tag => http example.com -1 #tag