]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man7/uri.7
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man7 / uri.7
CommitLineData
fea681da
MK
1.\" (C) Copyright 1999-2000 David A. Wheeler (dwheeler@dwheeler.com)
2.\"
5fbde956 3.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da
MK
4.\"
5.\" Fragments of this document are directly derived from IETF standards.
6.\" For those fragments which are directly derived from such standards,
7.\" the following notice applies, which is the standard copyright and
8.\" rights announcement of The Internet Society:
9.\"
10.\" Copyright (C) The Internet Society (1998). All Rights Reserved.
11.\" This document and translations of it may be copied and furnished to
12.\" others, and derivative works that comment on or otherwise explain it
13.\" or assist in its implementation may be prepared, copied, published
14.\" and distributed, in whole or in part, without restriction of any
15.\" kind, provided that the above copyright notice and this paragraph are
16.\" included on all such copies and derivative works. However, this
17.\" document itself may not be modified in any way, such as by removing
18.\" the copyright notice or references to the Internet Society or other
19.\" Internet organizations, except as needed for the purpose of
20.\" developing Internet standards in which case the procedures for
21.\" copyrights defined in the Internet Standards process must be
22.\" followed, or as required to translate it into languages other than English.
23.\"
24.\" Modified Fri Jul 25 23:00:00 1999 by David A. Wheeler (dwheeler@dwheeler.com)
25.\" Modified Fri Aug 21 23:00:00 1999 by David A. Wheeler (dwheeler@dwheeler.com)
26.\" Modified Tue Mar 14 2000 by David A. Wheeler (dwheeler@dwheeler.com)
27.\"
4c1c5274 28.TH uri 7 (date) "Linux man-pages (unreleased)"
fea681da
MK
29.SH NAME
30uri, url, urn \- uniform resource identifier (URI), including a URL or URN
31.SH SYNOPSIS
32.nf
33.HP 0.2i
34URI = [ absoluteURI | relativeURI ] [ "#" fragment ]
35.HP
36absoluteURI = scheme ":" ( hierarchical_part | opaque_part )
37.HP
38relativeURI = ( net_path | absolute_path | relative_path ) [ "?" query ]
fea681da 39.HP
c79efe90
MK
40scheme = "http" | "ftp" | "gopher" | "mailto" | "news" | "telnet" |
41 "file" | "man" | "info" | "whatis" | "ldap" | "wais" | \&...
fea681da
MK
42.HP
43hierarchical_part = ( net_path | absolute_path ) [ "?" query ]
fea681da
MK
44.HP
45net_path = "//" authority [ absolute_path ]
46.HP
47absolute_path = "/" path_segments
48.HP
49relative_path = relative_segment [ absolute_path ]
50.fi
51.SH DESCRIPTION
fea681da
MK
52A Uniform Resource Identifier (URI) is a short string of characters
53identifying an abstract or physical resource (for example, a web page).
1ae6452e
AC
54A Uniform Resource Locator (URL) is a URI
55that identifies a resource through its primary access
56mechanism (e.g., its network "location"), rather than
57by name or some other attribute of that resource.
58A Uniform Resource Name (URN) is a URI
59that must remain globally unique and persistent even when
60the resource ceases to exist or becomes unavailable.
fea681da
MK
61.PP
62URIs are the standard way to name hypertext link destinations
63for tools such as web browsers.
1ae6452e
AC
64The string "http://www.kernel.org" is a URL (and thus it
65is also a URI).
66Many people use the term URL loosely as a synonym for URI
67(though technically URLs are a subset of URIs).
fea681da
MK
68.PP
69URIs can be absolute or relative.
70An absolute identifier refers to a resource independent of
71context, while a relative
72identifier refers to a resource by describing the difference
73from the current context.
74Within a relative path reference, the complete path segments "." and
75".." have special meanings: "the current hierarchy level" and "the
76level above this hierarchy level", respectively, just like they do in
008f1ecc 77UNIX-like systems.
fea681da
MK
78A path segment which contains a colon
79character can't be used as the first segment of a relative URI path
80(e.g., "this:that"), because it would be mistaken for a scheme name;
81precede such segments with ./ (e.g., "./this:that").
b9560046 82Note that descendants of MS-DOS (e.g., Microsoft Windows) replace
fea681da
MK
83devicename colons with the vertical bar ("|") in URIs, so "C:" becomes "C|".
84.PP
85A fragment identifier, if included, refers to a particular named portion
f81fb444
MK
86(fragment) of a resource; text after a \(aq#\(aq identifies the fragment.
87A URI beginning with \(aq#\(aq refers to that fragment in the current resource.
446a4bc8 88.SS Usage
fea681da
MK
89There are many different URI schemes, each with specific
90additional rules and meanings, but they are intentionally made to be
91as similar as possible.
1ae6452e 92For example, many URL schemes
fea681da
MK
93permit the authority to be the following format, called here an
94.I ip_server
95(square brackets show what's optional):
96.HP
97.IR "ip_server = " [ user " [ : " password " ] @ ] " host " [ : " port ]
98.PP
18701562 99This format allows you to optionally insert a username,
fea681da
MK
100a user plus password, and/or a port number.
101The
102.I host
103is the name of the host computer, either its name as determined by DNS
104or an IP address (numbers separated by periods).
105Thus the URI
ffc3e08c
JW
106<http://fred:fredpassword@example.com:8080/>
107logs into a web server on host example.com
fea681da
MK
108as fred (using fredpassword) using port 8080.
109Avoid including a password in a URI if possible because of the many
110security risks of having a password written down.
1ae6452e
AC
111If the URL supplies a username but no password, and the remote
112server requests a password, the program interpreting the URL
fea681da
MK
113should request one from the user.
114.PP
008f1ecc 115Here are some of the most common schemes in use on UNIX-like systems
fea681da
MK
116that are understood by many tools.
117Note that many tools using URIs also have internal schemes or specialized
118schemes; see those tools' documentation for information on those schemes.
446a4bc8
MK
119.PP
120.B "http \- Web (HTTP) server"
121.PP
fea681da
MK
122.RI http:// ip_server / path
123.br
124.RI http:// ip_server / path ? query
125.PP
1ae6452e 126This is a URL accessing a web (HTTP) server.
fea681da
MK
127The default port is 80.
128If the path refers to a directory, the web server will choose what
129to return; usually if there is a file named "index.html" or "index.htm"
130its content is returned, otherwise, a list of the files in the current
131directory (with appropriate links) is generated and returned.
132An example is <http://lwn.net>.
133.PP
134A query can be given in the archaic "isindex" format, consisting of a
135word or phrase and not including an equal sign (=).
136A query can also be in the longer "GET" format, which has one or more
137query entries of the form
138.IR key = value
139separated by the ampersand character (&).
140Note that
141.I key
142can be repeated more than once, though it's up to the web server
143and its application programs to determine if there's any meaning to that.
144There is an unfortunate interaction with HTML/XML/SGML and
145the GET query format; when such URIs with more than one key
146are embedded in SGML/XML documents (including HTML), the ampersand
147(&) has to be rewritten as &amp;.
148Note that not all queries use this format; larger forms
149may be too long to store as a URI, so they use a different
6116ff44
MK
150interaction mechanism (called POST) which does
151not include the data in the URI.
fea681da 152See the Common Gateway Interface specification at
608bf950
SK
153.UR http://www.w3.org\:/CGI
154.UE
155for more information.
446a4bc8
MK
156.PP
157.B "ftp \- File Transfer Protocol (FTP)"
158.PP
fea681da
MK
159.RI ftp:// ip_server / path
160.PP
1ae6452e 161This is a URL accessing a file through the file transfer protocol (FTP).
fea681da 162The default port (for control) is 21.
18701562 163If no username is included, the username "anonymous" is supplied, and
fea681da
MK
164in that case many clients provide as the password the requestor's
165Internet email address.
166An example is
167<ftp://ftp.is.co.za/rfc/rfc1808.txt>.
446a4bc8
MK
168.PP
169.B "gopher \- Gopher server"
170.PP
fea681da
MK
171.RI gopher:// ip_server / "gophertype selector"
172.br
173.RI gopher:// ip_server / "gophertype selector" %09 search
174.br
175.RI gopher:// ip_server / "gophertype selector" %09 search %09 gopher+_string
176.br
177.PP
178The default gopher port is 70.
179.I gophertype
180is a single-character field to denote the
181Gopher type of the resource to
1ae6452e 182which the URL refers.
fea681da
MK
183The entire path may also be empty, in
184which case the delimiting "/" is also optional and the gophertype
185defaults to "1".
186.PP
187.I selector
c13182ef
MK
188is the Gopher selector string.
189In the Gopher protocol,
fea681da
MK
190Gopher selector strings are a sequence of octets which may contain
191any octets except 09 hexadecimal (US-ASCII HT or tab), 0A hexadecimal
192(US-ASCII character LF), and 0D (US-ASCII character CR).
446a4bc8
MK
193.PP
194.B "mailto \- Email address"
195.PP
fea681da
MK
196.RI mailto: email-address
197.PP
198This is an email address, usually of the form
199.IR name @ hostname .
200See
201.BR mailaddr (7)
202for more information on the correct format of an email address.
203Note that any % character must be rewritten as %25.
204An example is <mailto:dwheeler@dwheeler.com>.
446a4bc8
MK
205.PP
206.B "news \- Newsgroup or News message"
207.PP
fea681da
MK
208.RI news: newsgroup-name
209.br
210.RI news: message-id
211.PP
212A
213.I newsgroup-name
214is a period-delimited hierarchical name, such as
215"comp.infosystems.www.misc".
216If <newsgroup-name> is "*" (as in <news:*>), it is used to refer
217to "all available news groups".
218An example is <news:comp.lang.ada>.
219.PP
220A
221.I message-id
222corresponds to the Message-ID of
608bf950 223.UR http://www.ietf.org\:/rfc\:/rfc1036.txt
331da7c3 224IETF RFC\ 1036,
fea681da
MK
225.UE
226without the enclosing "<"
227and ">"; it takes the form
228.IR unique @ full_domain_name .
229A message identifier may be distinguished from a news group name by the
230presence of the "@" character.
446a4bc8
MK
231.PP
232.B "telnet \- Telnet login"
233.PP
fea681da
MK
234.RI telnet:// ip_server /
235.PP
1ae6452e 236The Telnet URL scheme is used to designate interactive text services that
c13182ef
MK
237may be accessed by the Telnet protocol.
238The final "/" character may be omitted.
fea681da
MK
239The default port is 23.
240An example is <telnet://melvyl.ucop.edu/>.
446a4bc8
MK
241.PP
242.B "file \- Normal file"
243.PP
fea681da
MK
244.RI file:// ip_server / path_segments
245.br
246.RI file: path_segments
247.PP
248This represents a file or directory accessible locally.
249As a special case,
7adfc6e1 250.I ip_server
fea681da 251can be the string "localhost" or the empty
1ae6452e 252string; this is interpreted as "the machine from which the URL is
2d986c92 253being interpreted".
fea681da
MK
254If the path is to a directory, the viewer should display the
255directory's contents with links to each containee;
256not all viewers currently do this.
1ae6452e 257KDE supports generated files through the URL <file:/cgi-bin>.
fea681da
MK
258If the given file isn't found, browser writers may want to try to expand
259the filename via filename globbing
260(see
261.BR glob (7)
262and
263.BR glob (3)).
264.PP
265The second format (e.g., <file:/etc/passwd>)
266is a correct format for referring to
c13182ef
MK
267a local file.
268However, older standards did not permit this format,
fea681da 269and some programs don't recognize this as a URI.
75b94dc3
MK
270A more portable syntax is to use an empty string as the server name,
271for example,
fea681da
MK
272<file:///etc/passwd>; this form does the same thing
273and is easily recognized by pattern matchers and older programs as a URI.
c75cdeb4 274Note that if you really mean to say "start from the current location", don't
fea681da
MK
275specify the scheme at all; use a relative address like <../test.txt>,
276which has the side-effect of being scheme-independent.
277An example of this scheme is <file:///etc/passwd>.
446a4bc8
MK
278.PP
279.B "man \- Man page documentation"
280.PP
fea681da
MK
281.RI man: command-name
282.br
283.RI man: command-name ( section )
284.PP
285This refers to local online manual (man) reference pages.
6116ff44
MK
286The command name can optionally be followed by a
287parenthesis and section number; see
fea681da
MK
288.BR man (7)
289for more information on the meaning of the section numbers.
008f1ecc 290This URI scheme is unique to UNIX-like systems (such as Linux)
fea681da
MK
291and is not currently registered by the IETF.
292An example is <man:ls(1)>.
446a4bc8
MK
293.PP
294.B "info \- Info page documentation"
295.PP
fea681da
MK
296.RI info: virtual-filename
297.br
298.RI info: virtual-filename # nodename
299.br
300.RI info:( virtual-filename )
301.br
302.RI info:( virtual-filename ) nodename
303.PP
304This scheme refers to online info reference pages (generated from
6116ff44
MK
305texinfo files),
306a documentation format used by programs such as the GNU tools.
008f1ecc 307This URI scheme is unique to UNIX-like systems (such as Linux)
fea681da
MK
308and is not currently registered by the IETF.
309As of this writing, GNOME and KDE differ in their URI syntax
310and do not accept the other's syntax.
311The first two formats are the GNOME format; in nodenames all spaces
312are written as underscores.
313The second two formats are the KDE format;
314spaces in nodenames must be written as spaces, even though this
315is forbidden by the URI standards.
316It's hoped that in the future most tools will understand all of these
317formats and will always accept underscores for spaces in nodenames.
318In both GNOME and KDE, if the form without the nodename is used the
319nodename is assumed to be "Top".
320Examples of the GNOME format are <info:gcc> and <info:gcc#G++_and_GCC>.
321Examples of the KDE format are <info:(gcc)> and <info:(gcc)G++ and GCC>.
446a4bc8
MK
322.PP
323.B "whatis \- Documentation search"
324.PP
fea681da
MK
325.RI whatis: string
326.PP
6116ff44
MK
327This scheme searches the database of short (one-line) descriptions of
328commands and returns a list of descriptions containing that string.
fea681da
MK
329Only complete word matches are returned.
330See
331.BR whatis (1).
008f1ecc 332This URI scheme is unique to UNIX-like systems (such as Linux)
fea681da 333and is not currently registered by the IETF.
446a4bc8
MK
334.PP
335.B "ghelp \- GNOME help documentation"
336.PP
fea681da
MK
337.RI ghelp: name-of-application
338.PP
339This loads GNOME help for the given application.
340Note that not much documentation currently exists in this format.
446a4bc8
MK
341.PP
342.B "ldap \- Lightweight Directory Access Protocol"
343.PP
fea681da
MK
344.RI ldap:// hostport
345.br
346.RI ldap:// hostport /
347.br
348.RI ldap:// hostport / dn
349.br
350.RI ldap:// hostport / dn ? attributes
351.br
352.RI ldap:// hostport / dn ? attributes ? scope
353.br
354.RI ldap:// hostport / dn ? attributes ? scope ? filter
355.br
356.RI ldap:// hostport / dn ? attributes ? scope ? filter ? extensions
357.PP
358This scheme supports queries to the
359Lightweight Directory Access Protocol (LDAP), a protocol for querying
3f624b93 360a set of servers for hierarchically organized information
fea681da 361(such as people and computing resources).
034dbf3a 362See
608bf950 363.UR http://www.ietf.org\:/rfc\:/rfc2255.txt
034dbf3a 364RFC\ 2255
fea681da 365.UE
1ae6452e
AC
366for more information on the LDAP URL scheme.
367The components of this URL are:
4279e42d
AC
368.TP
369hostport
fea681da
MK
370the LDAP server to query, written as a hostname optionally followed by
371a colon and the port number.
c13182ef 372The default LDAP port is TCP port 389.
fea681da 373If empty, the client determines which the LDAP server to use.
4279e42d
AC
374.TP
375dn
fea681da
MK
376the LDAP Distinguished Name, which identifies
377the base object of the LDAP search (see
608bf950 378.UR http://www.ietf.org\:/rfc\:/rfc2253.txt
331da7c3 379RFC\ 2253
fea681da
MK
380.UE
381section 3).
4279e42d
AC
382.TP
383attributes
fea681da 384a comma-separated list of attributes to be returned;
c13182ef 385see RFC\ 2251 section 4.1.5.
331da7c3 386If omitted, all attributes should be returned.
4279e42d
AC
387.TP
388scope
fea681da
MK
389specifies the scope of the search, which can be one of
390"base" (for a base object search), "one" (for a one-level search),
c13182ef
MK
391or "sub" (for a subtree search).
392If scope is omitted, "base" is assumed.
4279e42d
AC
393.TP
394filter
fea681da 395specifies the search filter (subset of entries
c13182ef
MK
396to return).
397If omitted, all entries should be returned.
fea681da 398See
608bf950 399.UR http://www.ietf.org\:/rfc\:/rfc2254.txt
331da7c3 400RFC\ 2254
fea681da
MK
401.UE
402section 4.
4279e42d
AC
403.TP
404extensions
fea681da
MK
405a comma-separated list of type=value
406pairs, where the =value portion may be omitted for options not
c13182ef 407requiring it.
f81fb444 408An extension prefixed with a \(aq!\(aq is critical
24b74457 409(must be supported to be valid), otherwise it is noncritical (optional).
fea681da
MK
410.PP
411LDAP queries are easiest to explain by example.
412Here's a query that asks ldap.itd.umich.edu for information about
413the University of Michigan in the U.S.:
0dac954b
MK
414.PP
415.nf
fea681da 416ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US
3ffdc54f 417.fi
fea681da
MK
418.PP
419To just get its postal address attribute, request:
0dac954b
MK
420.PP
421.nf
fea681da 422ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress
0dac954b 423.fi
fea681da
MK
424.PP
425To ask a host.com at port 6666 for information about the person
426with common name (cn) "Babs Jensen" at University of Michigan, request:
0dac954b
MK
427.PP
428.nf
fea681da 429ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)
0dac954b 430.fi
446a4bc8
MK
431.PP
432.B "wais \- Wide Area Information Servers"
433.PP
fea681da
MK
434.RI wais:// hostport / database
435.br
436.RI wais:// hostport / database ? search
437.br
438.RI wais:// hostport / database / wtype / wpath
439.PP
440This scheme designates a WAIS database, search, or document
441(see
608bf950 442.UR http://www.ietf.org\:/rfc\:/rfc1625.txt
331da7c3 443IETF RFC\ 1625
fea681da
MK
444.UE
445for more information on WAIS).
446Hostport is the hostname, optionally followed by a colon and port number
447(the default port number is 210).
448.PP
449The first form designates a WAIS database for searching.
450The second form designates a particular search of the WAIS database
451.IR database .
452The third form designates a particular document within a WAIS
453database to be retrieved.
454.I wtype
455is the WAIS designation of the type of the object and
456.I wpath
457is the WAIS document-id.
446a4bc8
MK
458.PP
459.B "other schemes"
460.PP
fea681da
MK
461There are many other URI schemes.
462Most tools that accept URIs support a set of internal URIs
463(e.g., Mozilla has the about: scheme for internal information,
464and the GNOME help browser has the toc: scheme for various starting
465locations).
466There are many schemes that have been defined but are not as widely
467used at the current time
468(e.g., prospero).
469The nntp: scheme is deprecated in favor of the news: scheme.
470URNs are to be supported by the urn: scheme, with a hierarchical name space
471(e.g., urn:ietf:... would identify IETF documents); at this time
472URNs are not widely implemented.
473Not all tools support all schemes.
73d8cece 474.SS Character encoding
fea681da
MK
475URIs use a limited number of characters so that they can be
476typed in and used in a variety of situations.
477.PP
478The following characters are reserved, that is, they may appear in a
479URI but their use is limited to their reserved purpose
480(conflicting data must be escaped before forming the URI):
481.IP
1ae6b2c7
AC
482.in +4n
483.EX
484; / ? : @ & = + $ ,
485.EE
486.in
fea681da
MK
487.PP
488Unreserved characters may be included in a URI.
489Unreserved characters
2d72d489 490include uppercase and lowercase Latin letters,
fea681da
MK
491decimal digits, and the following
492limited set of punctuation marks and symbols:
493.IP
1ae6b2c7
AC
494.in +4n
495.EX
496\- _ . ! \(ti * ' ( )
497.EE
498.in
fea681da
MK
499.PP
500All other characters must be escaped.
501An escaped octet is encoded as a character triplet, consisting of the
502percent character "%" followed by the two hexadecimal digits
efaef3da 503representing the octet code (you can use uppercase or lowercase letters
c13182ef
MK
504for the hexadecimal digits).
505For example, a blank space must be escaped
fea681da
MK
506as "%20", a tab character as "%09", and the "&" as "%26".
507Because the percent "%" character always has the reserved purpose of
508being the escape indicator, it must be escaped as "%25".
509It is common practice to escape space characters as the plus symbol (+)
510in query text; this practice isn't uniformly defined
511in the relevant RFCs (which recommend %20 instead) but any tool accepting
512URIs with query text should be prepared for them.
513A URI is always shown in its "escaped" form.
514.PP
515Unreserved characters can be escaped without changing the semantics
516of the URI, but this should not be done unless the URI is being used
517in a context that does not allow the unescaped character to appear.
1ae6452e
AC
518For example, "%7e" is sometimes used instead of "\(ti" in an HTTP URL
519path, but the two are equivalent for an HTTP URL.
fea681da
MK
520.PP
521For URIs which must handle characters outside the US ASCII character set,
522the HTML 4.01 specification (section B.2) and
da6e8c9d
AC
523IETF RFC\~3986 (last paragraph of section 2.5)
524recommend the following approach:
22356d97 525.IP (1) 5
0adb82e8 526translate the character sequences into UTF-8 (IETF RFC\~3629)\(emsee
28a4c58c 527.BR utf\-8 (7)\(emand
5503c85e 528then
22356d97 529.IP (2)
fea681da
MK
530use the URI escaping mechanism, that is,
531use the %HH encoding for unsafe octets.
73d8cece 532.SS Writing a URI
eb1af896 533When written, URIs should be placed inside double quotes
6ade226b 534(e.g., "http://www.kernel.org"),
fea681da
MK
535enclosed in angle brackets (e.g., <http://lwn.net>),
536or placed on a line by themselves.
537A warning for those who use double-quotes:
538.B never
539move extraneous punctuation (such as the period ending a sentence or the
540comma in a list)
541inside a URI, since this will change the value of the URI.
542Instead, use angle brackets instead, or
543switch to a quoting system that never includes extraneous characters
544inside quotation marks.
545This latter system, called the 'new' or 'logical' quoting system by
546"Hart's Rules" and the "Oxford Dictionary for Writers and Editors",
fb0d03d1 547is preferred practice in Great Britain and in various European languages.
c13182ef 548Older documents suggested inserting the prefix "URL:"
fea681da
MK
549just before the URI, but this form has never caught on.
550.PP
551The URI syntax was designed to be unambiguous.
552However, as URIs have become commonplace, traditional media
553(television, radio, newspapers, billboards, etc.) have increasingly
554used abbreviated URI references consisting of
555only the authority and path portions of the identified resource
556(e.g., <www.w3.org/Addressing>).
557Such references are primarily
558intended for human interpretation rather than machine, with the
559assumption that context-based heuristics are sufficient to complete
560the URI (e.g., hostnames beginning with "www" are likely to have
561a URI prefix of "http://" and hostnames beginning with "ftp" likely
562to have a prefix of "ftp://").
563Many client implementations heuristically resolve these references.
564Such heuristics may
565change over time, particularly when new schemes are introduced.
1ae6452e 566Since an abbreviated URI has the same syntax as a relative URL path,
fea681da 567abbreviated URI references cannot be used where relative URIs are
33a0ccb2 568permitted, and can be used only when there is no defined base
fea681da
MK
569(such as in dialog boxes).
570Don't use abbreviated URIs as hypertext links inside a document;
571use the standard format as described here.
3113c7f3 572.SH STANDARDS
608bf950
SK
573.UR http://www.ietf.org\:/rfc\:/rfc2396.txt
574(IETF RFC\ 2396)
575.UE ,
5465ae95 576.UR http://www.w3.org\:/TR\:/REC\-html40
608bf950
SK
577(HTML 4.0)
578.UE .
fea681da
MK
579.SH NOTES
580Any tool accepting URIs (e.g., a web browser) on a Linux system should
6116ff44
MK
581be able to handle (directly or indirectly) all of the
582schemes described here, including the man: and info: schemes.
583Handling them by invoking some other program is
584fine and in fact encouraged.
fea681da
MK
585.PP
586Technically the fragment isn't part of the URI.
587.PP
1ae6452e 588For information on how to embed URIs (including URLs) in a data format,
fea681da
MK
589see documentation on that format.
590HTML uses the format <A HREF="\fIuri\fP">
591.I text
592</A>.
593Texinfo files use the format @uref{\fIuri\fP}.
3f624b93 594Man and mdoc have the recently added UR macro, or just include the
fea681da
MK
595URI in the text (viewers should be able to detect :// as part of a URI).
596.PP
6116ff44
MK
597The GNOME and KDE desktop environments currently vary in the URIs
598they accept, in particular in their respective help browsers.
fea681da
MK
599To list man pages, GNOME uses <toc:man> while KDE uses <man:(index)>, and
600to list info pages, GNOME uses <toc:info> while KDE uses <info:(dir)>
601(the author of this man page prefers the KDE approach here, though a more
602regular format would be even better).
603In general, KDE uses <file:/cgi-bin/> as a prefix to a set of generated
604files.
605KDE prefers documentation in HTML, accessed via the
606<file:/cgi-bin/helpindex>.
607GNOME prefers the ghelp scheme to store and find documentation.
608Neither browser handles file: references to directories at the time
609of this writing, making it difficult to refer to an entire directory with
610a browsable URI.
6116ff44
MK
611As noted above, these environments differ in how they handle the
612info: scheme, probably the most important variation.
fea681da
MK
613It is expected that GNOME and KDE
614will converge to common URI formats, and a future
615version of this man page will describe the converged result.
616Efforts to aid this convergence are encouraged.
2b2581ee 617.SS Security
fea681da 618A URI does not in itself pose a security threat.
1ae6452e
AC
619There is no general guarantee that a URL, which at one time
620located a given resource, will continue to do so.
621Nor is there any
622guarantee that a URL will not locate a different resource at some
623later point in time; such a guarantee can be
624obtained only from the person(s) controlling that namespace and the
625resource in question.
626.PP
627It is sometimes possible to construct a URL such that an attempt to
628perform a seemingly harmless operation, such as the
629retrieval of an entity associated with the resource, will in fact
630cause a possibly damaging remote operation to occur.
631The unsafe URL
632is typically constructed by specifying a port number other than that
c13182ef
MK
633reserved for the network protocol in question.
634The client unwittingly contacts a site that is in fact
635running a different protocol.
1ae6452e
AC
636The content of the URL contains instructions that, when
637interpreted according to this other protocol, cause an unexpected
638operation.
639An example has been the use of a gopher URL to cause an
640unintended or impersonating message to be sent via a SMTP server.
641.PP
642Caution should be used when using any URL that specifies a port
643number other than the default for the protocol, especially when it is
644a number within the reserved space.
fea681da
MK
645.PP
646Care should be taken when a URI contains escaped delimiters for a
647given protocol (for example, CR and LF characters for telnet
c13182ef
MK
648protocols) that these are not unescaped before transmission.
649This might violate the protocol, but avoids the potential for such
fea681da
MK
650characters to be used to simulate an extra operation or parameter in
651that protocol, which might lead to an unexpected and possibly harmful
652remote operation to be performed.
653.PP
654It is clearly unwise to use a URI that contains a password which is
c13182ef
MK
655intended to be secret.
656In particular, the use of a password within
84c517a4
MK
657the "userinfo" component of a URI is strongly recommended against except
658in those rare cases where the "password" parameter is intended to be public.
fea681da 659.SH BUGS
fea681da
MK
660Documentation may be placed in a variety of locations, so there
661currently isn't a good URI scheme for general online documentation
662in arbitrary formats.
663References of the form
664<file:///usr/doc/ZZZ> don't work because different distributions and
665local installation requirements may place the files in different
666directories
6116ff44
MK
667(it may be in /usr/doc, or /usr/local/doc, or /usr/share,
668or somewhere else).
fea681da
MK
669Also, the directory ZZZ usually changes when a version changes
670(though filename globbing could partially overcome this).
6116ff44
MK
671Finally, using the file: scheme doesn't easily support people
672who dynamically load documentation from the Internet (instead of
9ee4a2b6 673loading the files onto a local filesystem).
fea681da 674A future URI scheme may be added (e.g., "userdoc:") to permit
6116ff44
MK
675programs to include cross-references to more detailed documentation
676without having to know the exact location of that documentation.
9ee4a2b6 677Alternatively, a future version of the filesystem specification may
fea681da
MK
678specify file locations sufficiently so that the file: scheme will
679be able to locate documentation.
680.PP
681Many programs and file formats don't include a way to incorporate
682or implement links using URIs.
683.PP
684Many programs can't handle all of these different URI formats; there
685should be a standard mechanism to load an arbitrary URI that automatically
6116ff44 686detects the users' environment (e.g., text or graphics,
3f624b93 687desktop environment, local user preferences, and currently executing
6116ff44 688tools) and invokes the right tool for any URI.
fd7f0a7f
MK
689.\" .SH AUTHOR
690.\" David A. Wheeler (dwheeler@dwheeler.com) wrote this man page.
47297adb 691.SH SEE ALSO
fea681da
MK
692.BR lynx (1),
693.BR man2html (1),
694.BR mailaddr (7),
cd415e73 695.BR utf\-8 (7)
5711c04f 696.PP
608bf950 697.UR http://www.ietf.org\:/rfc\:/rfc2255.txt
baf17bc4 698IETF RFC\ 2255
fea681da 699.UE