84cf85abdd690b32db0e1f3f6127edbe5e1e2521
[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               => /baz
50                                           /foo/bar /baz                 => /baz
51                                           /foo/bar ../../../baz         => /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
66 Testing av_url_split:
67 /foo/bar                                                     =>                                                    -1 /foo/bar
68 http://server/foo/                                           => http                            server             -1 /foo/
69 http://example.com/foo/bar                                   => http                            example.com        -1 /foo/bar
70 http://user:pass@localhost:8080/foo/bar/123                  => http            user:pass       localhost        8080 /foo/bar/123
71 http://server/foo/bar?param=value/with/slashes               => http                            server             -1 /foo/bar?param=value/with/slashes
72 https://1l-lh.a.net/i/1LIVE_HDS@179577/master.m3u8           => https                           1l-lh.a.net        -1 /i/1LIVE_HDS@179577/master.m3u8
73 ftp://u:p%2B%2F2@ftp.pbt.com/ExportHD.mpg                    => ftp             u:p%2B%2F2      ftp.pbt.com        -1 /ExportHD.mpg
74 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=
75 http://example.com#tag                                       => http                            example.com        -1 #tag