summaryrefslogtreecommitdiff
path: root/tests/ref/fate/url
blob: 84cf85abdd690b32db0e1f3f6127edbe5e1e2521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Testing ff_url_decompose:

http://user:pass@ffmpeg:8080/dir/file?query#fragment =>
  scheme: http:
  authority: //
  userinfo: user:pass@
  host: ffmpeg
  port: :8080
  path: /dir/file
  query: ?query
  fragment: #fragment

http://ffmpeg/dir/file =>
  scheme: http:
  authority: //
  host: ffmpeg
  path: /dir/file

file:///dev/null =>
  scheme: file:
  authority: //
  path: /dev/null

file:/dev/null =>
  scheme: file:
  path: /dev/null

http://[::1]/dev/null =>
  scheme: http:
  authority: //
  host: [::1]
  path: /dev/null

http://[::1]:8080/dev/null =>
  scheme: http:
  authority: //
  host: [::1]
  port: :8080
  path: /dev/null

//ffmpeg/dev/null =>
  authority: //
  host: ffmpeg
  path: /dev/null

Testing ff_make_absolute_url:
                                            (null) baz                  => baz
                                          /foo/bar baz                  => /foo/baz
                                          /foo/bar ../baz               => /baz
                                          /foo/bar /baz                 => /baz
                                          /foo/bar ../../../baz         => /baz
                                http://server/foo/ baz                  => http://server/foo/baz
                             http://server/foo/bar baz                  => http://server/foo/baz
                                http://server/foo/ ../baz               => http://server/baz
                         http://server/foo/bar/123 ../../baz            => http://server/baz
                         http://server/foo/bar/123 /baz                 => http://server/baz
                         http://server/foo/bar/123 https://other/url    => https://other/url
    http://server/foo/bar?param=value/with/slashes /baz                 => http://server/baz
            http://server/foo/bar?param&otherparam ?someparam           => http://server/foo/bar?someparam
                             http://server/foo/bar //other/url          => http://other/url
                             http://server/foo/bar ../../../../../other/url => http://server/other/url
                             http://server/foo/bar /../../../../../other/url => http://server/other/url
                             http://server/foo/bar /test/../../../../../other/url => http://server/other/url
                             http://server/foo/bar /test/../../test/../../../other/url => http://server/other/url

Testing av_url_split:
/foo/bar                                                     =>                                                    -1 /foo/bar
http://server/foo/                                           => http                            server             -1 /foo/
http://example.com/foo/bar                                   => http                            example.com        -1 /foo/bar
http://user:pass@localhost:8080/foo/bar/123                  => http            user:pass       localhost        8080 /foo/bar/123
http://server/foo/bar?param=value/with/slashes               => http                            server             -1 /foo/bar?param=value/with/slashes
https://1l-lh.a.net/i/1LIVE_HDS@179577/master.m3u8           => https                           1l-lh.a.net        -1 /i/1LIVE_HDS@179577/master.m3u8
ftp://u:p%2B%2F2@ftp.pbt.com/ExportHD.mpg                    => ftp             u:p%2B%2F2      ftp.pbt.com        -1 /ExportHD.mpg
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=
http://example.com#tag                                       => http                            example.com        -1 #tag