lavf/url: rewrite ff_make_absolute_url() using ff_url_decompose().
[ffmpeg.git] / tests / ref / fate / url
1 Testing ff_url_decompose:
2
3 http://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
13 http://ffmpeg/dir/file =>
14   scheme: http:
15   authority: //
16   host: ffmpeg
17   path: /dir/file
18
19 file:///dev/null =>
20   scheme: file:
21   authority: //
22   path: /dev/null
23
24 file:/dev/null =>
25   scheme: file:
26   path: /dev/null
27
28 http://[::1]/dev/null =>
29   scheme: http:
30   authority: //
31   host: [::1]
32   path: /dev/null
33
34 http://[::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
46 Testing ff_make_absolute_url:
47                                             (null) baz                  => baz
48                                           /foo/bar baz                  => /foo/baz
49                                           /foo/bar ../baz               => /foo/../baz
50                                           /foo/bar /baz                 => /baz
51                                           /foo/bar ../../../baz         => /foo/../../../baz
52                                 http://server/foo/ baz                  => http://server/foo/baz
53                              http://server/foo/bar baz                  => http://server/foo/baz
54                                 http://server/foo/ ../baz               => http://server/baz
55                          http://server/foo/bar/123 ../../baz            => http://server/baz
56                          http://server/foo/bar/123 /baz                 => http://server/baz
57                          http://server/foo/bar/123 https://other/url    => https://other/url
58     http://server/foo/bar?param=value/with/slashes /baz                 => http://server/baz
59             http://server/foo/bar?param&otherparam ?someparam           => http://server/foo/bar?someparam
60                              http://server/foo/bar //other/url          => http://other/url
61                              http://server/foo/bar ../../../../../other/url => http://server/other/url
62                              http://server/foo/bar /../../../../../other/url => http://server/other/url
63                              http://server/foo/bar /test/../../../../../other/url => http://server/other/url
64                              http://server/foo/bar /test/../../test/../../../other/url => http://server/other/url
65                              http://server/foo/bar file:../baz/qux      => file:../baz/qux
66                            http://server/foo//bar/ ../../               => http://server/foo/
67                                    file:../tmp/foo ../bar/              => file:../tmp/../bar/
68                                    file:../tmp/foo file:../bar/         => file:../bar/
69                              http://server/foo/bar ./                   => http://server/foo/
70                              http://server/foo/bar .dotfile             => http://server/foo/.dotfile
71                              http://server/foo/bar ..doubledotfile      => http://server/foo/..doubledotfile
72                              http://server/foo/bar double..dotfile      => http://server/foo/double..dotfile
73                              http://server/foo/bar doubledotfile..      => http://server/foo/doubledotfile..
74                                 http://a/b/c/d;p?q g:h                  => g:h
75                                 http://a/b/c/d;p?q g                    => http://a/b/c/g
76                                 http://a/b/c/d;p?q ./g                  => http://a/b/c/g
77                                 http://a/b/c/d;p?q g/                   => http://a/b/c/g/
78                                 http://a/b/c/d;p?q /g                   => http://a/g
79                                 http://a/b/c/d;p?q //g                  => http://g
80                                 http://a/b/c/d;p?q ?y                   => http://a/b/c/d;p?y
81                                 http://a/b/c/d;p?q g?y                  => http://a/b/c/g?y
82                                 http://a/b/c/d;p?q #s                   => http://a/b/c/d;p?q#s
83                                 http://a/b/c/d;p?q g#s                  => http://a/b/c/g#s
84                                 http://a/b/c/d;p?q g?y#s                => http://a/b/c/g?y#s
85                                 http://a/b/c/d;p?q ;x                   => http://a/b/c/;x
86                                 http://a/b/c/d;p?q g;x                  => http://a/b/c/g;x
87                                 http://a/b/c/d;p?q g;x?y#s              => http://a/b/c/g;x?y#s
88                                 http://a/b/c/d;p?q                      => http://a/b/c/d;p?q
89                                 http://a/b/c/d;p?q .                    => http://a/b/c/
90                                 http://a/b/c/d;p?q ./                   => http://a/b/c/
91                                 http://a/b/c/d;p?q ..                   => http://a/b/
92                                 http://a/b/c/d;p?q ../                  => http://a/b/
93                                 http://a/b/c/d;p?q ../g                 => http://a/b/g
94                                 http://a/b/c/d;p?q ../..                => http://a/
95                                 http://a/b/c/d;p?q ../../               => http://a/
96                                 http://a/b/c/d;p?q ../../g              => http://a/g
97                                 http://a/b/c/d;p?q ../../../g           => http://a/g
98                                 http://a/b/c/d;p?q ../../../../g        => http://a/g
99                                 http://a/b/c/d;p?q /./g                 => http://a/g
100                                 http://a/b/c/d;p?q /../g                => http://a/g
101                                 http://a/b/c/d;p?q g.                   => http://a/b/c/g.
102                                 http://a/b/c/d;p?q .g                   => http://a/b/c/.g
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/g
106                                 http://a/b/c/d;p?q ./g/.                => http://a/b/c/g/
107                                 http://a/b/c/d;p?q g/./h                => http://a/b/c/g/h
108                                 http://a/b/c/d;p?q g/../h               => http://a/b/c/h
109                                 http://a/b/c/d;p?q g;x=1/./y            => http://a/b/c/g;x=1/y
110                                 http://a/b/c/d;p?q g;x=1/../y           => http://a/b/c/y
111                                 http://a/b/c/d;p?q g?y/./x              => http://a/b/c/g?y/./x
112                                 http://a/b/c/d;p?q g?y/../x             => http://a/b/c/g?y/../x
113                                 http://a/b/c/d;p?q g#s/./x              => http://a/b/c/g#s/./x
114                                 http://a/b/c/d;p?q g#s/../x             => http://a/b/c/g#s/../x
115
116 Testing av_url_split:
117 /foo/bar                                                     =>                                                    -1 /foo/bar
118 http://server/foo/                                           => http                            server             -1 /foo/
119 http://example.com/foo/bar                                   => http                            example.com        -1 /foo/bar
120 http://user:pass@localhost:8080/foo/bar/123                  => http            user:pass       localhost        8080 /foo/bar/123
121 http://server/foo/bar?param=value/with/slashes               => http                            server             -1 /foo/bar?param=value/with/slashes
122 https://1l-lh.a.net/i/1LIVE_HDS@179577/master.m3u8           => https                           1l-lh.a.net        -1 /i/1LIVE_HDS@179577/master.m3u8
123 ftp://u:p%2B%2F2@ftp.pbt.com/ExportHD.mpg                    => ftp             u:p%2B%2F2      ftp.pbt.com        -1 /ExportHD.mpg
124 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=
125 http://example.com#tag                                       => http                            example.com        -1 #tag