Debian lenny version packages
[pkg-perl] / deb-src / liburi-perl / liburi-perl-1.35.dfsg.1 / t / roytest5.html
1 <HTML><HEAD>
2 <TITLE>Examples of Resolving Relative URLs, Part 5</TITLE>
3 <BASE href="http:///s//a/b/c">
4 </HEAD><BODY>
5 <H1>Examples of Resolving Relative URLs, Part 5</H1>
6
7 This document has an embedded base URL of
8 <PRE>
9    Content-Base: http:///s//a/b/c
10 </PRE>
11 in order to test a notion that Tim Berners-Lee mentioned regarding
12 the ability of URIs to have a triple-slash (or even more slashes)
13 to indicate higher levels of hierarchy than those already used by URLs.
14 This is the same as Part 4, except that the scheme "fred" is replaced
15 with "http" for clients that stupidly change their parsing behavior
16 based on the scheme name.
17
18 <H2>Tested Clients and Client Libraries</H2>
19
20 <DL COMPACT>
21 <DT>[R]
22 <DD>RFC 2396 (the right way to parse)
23 <DT>Tim
24 <DD>Tim Berners-Lee's proposed interpretation
25 <DT>[1]
26 <DD>Mozilla/4.03 [en] (X11; U; SunOS 5.5 sun4u; Nav)
27 <DT>[2]
28 <DD>Lynx/2.7.1 libwww-FM/2.14
29 <DT>[3]
30 <DD>MSIE 3.01; Windows 95
31 <DT>[4]
32 <DD>NCSA_Mosaic/2.6 (X11;SunOS 4.1.2 sun4m)
33 </DL>
34
35 <H3>Synopsis</H3>
36
37 RFC 1808 specified that the highest level for relative URLs is indicated
38 by a double-slash "//", and therefore that any triple-slash would be
39 considered a null site component, rather than a higher-level component
40 than the site component (as proposed by Tim).<P>
41
42 Draft 09 assumes that a triple-slash means an empty site component,
43 as does Netscape Navigator if the scheme is known.
44 Oddly, Lynx seems to straddle both sides.
45
46 <H2>Examples</H2>
47 <PRE>
48                   RESULTS                       from
49
50 <a href="g:h">g:h</a>            =  g:h                           [R,Tim,2,3]
51                   http:///s//a/b/g:h            [1]
52
53 <a href="g">g</a>              =  http:///s//a/b/g              [R,Tim,1,2,3]
54
55 <a href="./g">./g</a>            =  http:///s//a/b/g              [R,Tim,1,2,3]
56
57 <a href="g/">g/</a>             =  http:///s//a/b/g/             [R,Tim,1,2,3]
58
59 <a href="/g">/g</a>             =  http:///g                     [R,1,2,3]
60                   http:///s//a/g                [Tim]
61
62 <a href="//g">//g</a>            =  http://g                      [R,1,2,3]
63                   http:///s//g                  [Tim]
64
65 <a href="//g/x">//g/x</a>          =  http://g/x                    [R,1,2,3]
66                   http:///s//g/x                [Tim]
67
68 <a href="///g">///g</a>           =  http:///g                     [R,Tim,1,2,3]
69
70 <a href="./">./</a>             =  http:///s//a/b/               [R,Tim,1,2,3]
71
72 <a href="../">../</a>            =  http:///s//a/                 [R,Tim,1,2,3]
73
74 <a href="../g">../g</a>           =  http:///s//a/g                [R,Tim,1,2,3]
75
76 <a href="../../">../../</a>         =  http:///s//                   [R,1]
77                   http:///s//a/../              [Tim,2]
78                   http:///s//a/                 [3]
79
80 <a href="../../g">../../g</a>        =  http:///s//g                  [R,1]
81                   http:///s//a/../g             [Tim,2]
82                   http:///s//a/g                [3]
83
84 <a href="../../../g">../../../g</a>     =  http:///s/g                   [R,1]
85                   http:///s//a/../../g          [Tim,2]
86                   http:///s//a/g                [3]
87
88 <a href="../../../../g">../../../../g</a>  =  http:///g                     [R,1]
89                   http:///s//a/../../../g       [Tim,2]
90                   http:///s//a/g                [3]
91 </PRE>
92 </BODY></HTML>