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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397
|
<pre>Network Working Group T. Berners-Lee
Request for Comments: 1738 CERN
Category: Standards Track L. Masinter
Xerox Corporation
M. McCahill
University of Minnesota
Editors
December 1994
<span class="h1">Uniform Resource Locators (URL)</span>
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Abstract
This document specifies a Uniform Resource Locator (URL), the syntax
and semantics of formalized information for location and access of
resources via the Internet.
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document describes the syntax and semantics for a compact string
representation for a resource available via the Internet. These
strings are called "Uniform Resource Locators" (URLs).
The specification is derived from concepts introduced by the World-
Wide Web global information initiative, whose use of such objects
dates from 1990 and is described in "Universal Resource Identifiers
in WWW", <a href="./rfc1630">RFC 1630</a>. The specification of URLs is designed to meet the
requirements laid out in "Functional Requirements for Internet
Resource Locators" [<a href="#ref-12" title=""Functional Requirements for Internet Resource Locators"">12</a>].
This document was written by the URI working group of the Internet
Engineering Task Force. Comments may be addressed to the editors, or
to the URI-WG <uri@bunyip.com>. Discussions of the group are archived
at <URL:http://www.acl.lanl.gov/URI/archive/uri-archive.index.html>
<span class="grey">Berners-Lee, Masinter & McCahill [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. General URL Syntax</span>
Just as there are many different methods of access to resources,
there are several schemes for describing the location of such
resources.
The generic syntax for URLs provides a framework for new schemes to
be established using protocols other than those defined in this
document.
URLs are used to `locate' resources, by providing an abstract
identification of the resource location. Having located a resource,
a system may perform a variety of operations on the resource, as
might be characterized by such words as `access', `update',
`replace', `find attributes'. In general, only the `access' method
needs to be specified for any URL scheme.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. The main parts of URLs</span>
A full BNF description of the URL syntax is given in <a href="#section-5">Section 5</a>.
In general, URLs are written as follows:
<scheme>:<scheme-specific-part>
A URL contains the name of the scheme being used (<scheme>) followed
by a colon and then a string (the <scheme-specific-part>) whose
interpretation depends on the scheme.
Scheme names consist of a sequence of characters. The lower case
letters "a"--"z", digits, and the characters plus ("+"), period
("."), and hyphen ("-") are allowed. For resiliency, programs
interpreting URLs should treat upper case letters as equivalent to
lower case in scheme names (e.g., allow "HTTP" as well as "http").
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. URL Character Encoding Issues</span>
URLs are sequences of characters, i.e., letters, digits, and special
characters. A URLs may be represented in a variety of ways: e.g., ink
on paper, or a sequence of octets in a coded character set. The
interpretation of a URL depends only on the identity of the
characters used.
In most URL schemes, the sequences of characters in different parts
of a URL are used to represent sequences of octets used in Internet
protocols. For example, in the ftp scheme, the host name, directory
name and file names are such sequences of octets, represented by
parts of the URL. Within those parts, an octet may be represented by
<span class="grey">Berners-Lee, Masinter & McCahill [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
the chararacter which has that octet as its code within the US-ASCII
[<a href="#ref-20" title=""Coded Character Set -- 7-bit American Standard Code for Information Interchange"">20</a>] coded character set.
In addition, octets may be encoded by a character triplet consisting
of the character "%" followed by the two hexadecimal digits (from
"0123456789ABCDEF") which forming the hexadecimal value of the octet.
(The characters "abcdef" may also be used in hexadecimal encodings.)
Octets must be encoded if they have no corresponding graphic
character within the US-ASCII coded character set, if the use of the
corresponding character is unsafe, or if the corresponding character
is reserved for some other interpretation within the particular URL
scheme.
No corresponding graphic US-ASCII:
URLs are written only with the graphic printable characters of the
US-ASCII coded character set. The octets 80-FF hexadecimal are not
used in US-ASCII, and the octets 00-1F and 7F hexadecimal represent
control characters; these must be encoded.
Unsafe:
Characters can be unsafe for a number of reasons. The space
character is unsafe because significant spaces may disappear and
insignificant spaces may be introduced when URLs are transcribed or
typeset or subjected to the treatment of word-processing programs.
The characters "<" and ">" are unsafe because they are used as the
delimiters around URLs in free text; the quote mark (""") is used to
delimit URLs in some systems. The character "#" is unsafe and should
always be encoded because it is used in World Wide Web and in other
systems to delimit a URL from a fragment/anchor identifier that might
follow it. The character "%" is unsafe because it is used for
encodings of other characters. Other characters are unsafe because
gateways and other transport agents are known to sometimes modify
such characters. These characters are "{", "}", "|", "\", "^", "~",
"[", "]", and "`".
All unsafe characters must always be encoded within a URL. For
example, the character "#" must be encoded within URLs even in
systems that do not normally deal with fragment or anchor
identifiers, so that if the URL is copied into another system that
does use them, it will not be necessary to change the URL encoding.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
Reserved:
Many URL schemes reserve certain characters for a special meaning:
their appearance in the scheme-specific part of the URL has a
designated semantics. If the character corresponding to an octet is
reserved in a scheme, the octet must be encoded. The characters ";",
"/", "?", ":", "@", "=" and "&" are the characters which may be
reserved for special meaning within a scheme. No other characters may
be reserved within a scheme.
Usually a URL has the same interpretation when an octet is
represented by a character and when it encoded. However, this is not
true for reserved characters: encoding a character reserved for a
particular scheme may change the semantics of a URL.
Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
reserved characters used for their reserved purposes may be used
unencoded within a URL.
On the other hand, characters that are not required to be encoded
(including alphanumerics) may be encoded within the scheme-specific
part of a URL, as long as they are not being used for a reserved
purpose.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a> Hierarchical schemes and relative links</span>
In some cases, URLs are used to locate resources that contain
pointers to other resources. In some cases, those pointers are
represented as relative links where the expression of the location of
the second resource is in terms of "in the same place as this one
except with the following relative path". Relative links are not
described in this document. However, the use of relative links
depends on the original URL containing a hierarchical structure
against which the relative link is based.
Some URL schemes (such as the ftp, http, and file schemes) contain
names that can be considered hierarchical; the components of the
hierarchy are separated by "/".
<span class="grey">Berners-Lee, Masinter & McCahill [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Specific Schemes</span>
The mapping for some existing standard and experimental protocols is
outlined in the BNF syntax definition. Notes on particular protocols
follow. The schemes covered are:
ftp File Transfer protocol
http Hypertext Transfer Protocol
gopher The Gopher protocol
mailto Electronic mail address
news USENET news
nntp USENET news using NNTP access
telnet Reference to interactive sessions
wais Wide Area Information Servers
file Host-specific file names
prospero Prospero Directory Service
Other schemes may be specified by future specifications. <a href="#section-4">Section 4</a> of
this document describes how new schemes may be registered, and lists
some scheme names that are under development.
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Common Internet Scheme Syntax</span>
While the syntax for the rest of the URL may vary depending on the
particular scheme selected, URL schemes that involve the direct use
of an IP-based protocol to a specified host on the Internet use a
common syntax for the scheme-specific data:
//<user>:<password>@<host>:<port>/<url-path>
Some or all of the parts "<user>:<password>@", ":<password>",
":<port>", and "/<url-path>" may be excluded. The scheme specific
data start with a double slash "//" to indicate that it complies with
the common Internet scheme syntax. The different components obey the
following rules:
user
An optional user name. Some schemes (e.g., ftp) allow the
specification of a user name.
password
An optional password. If present, it follows the user
name separated from it by a colon.
The user name (and password), if present, are followed by a
commercial at-sign "@". Within the user and password field, any ":",
"@", or "/" must be encoded.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
Note that an empty user name or password is different than no user
name or password; there is no way to specify a password without
specifying a user name. E.g., <URL:ftp://@host.com/> has an empty
user name and no password, <URL:ftp://host.com/> has no user name,
while <URL:ftp://foo:@host.com/> has a user name of "foo" and an
empty password.
host
The fully qualified domain name of a network host, or its IP
address as a set of four decimal digit groups separated by
".". Fully qualified domain names take the form as described
in <a href="./rfc1034#section-3.5">Section 3.5 of RFC 1034</a> [<a href="#ref-13" title=""Domain Names - Concepts and Facilities"">13</a>] and <a href="./rfc1123#section-2.1">Section 2.1 of RFC 1123</a>
[<a href="#ref-5" title=""Requirements for Internet Hosts -- Application and Support"">5</a>]: a sequence of domain labels separated by ".", each domain
label starting and ending with an alphanumerical character and
possibly also containing "-" characters. The rightmost domain
label will never start with a digit, though, which
syntactically distinguishes all domain names from the IP
addresses.
port
The port number to connect to. Most schemes designate
protocols that have a default port number. Another port number
may optionally be supplied, in decimal, separated from the
host by a colon. If the port is omitted, the colon is as well.
url-path
The rest of the locator consists of data specific to the
scheme, and is known as the "url-path". It supplies the
details of how the specified resource can be accessed. Note
that the "/" between the host (or port) and the url-path is
NOT part of the url-path.
The url-path syntax depends on the scheme being used, as does the
manner in which it is interpreted.
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. FTP</span>
The FTP URL scheme is used to designate files and directories on
Internet hosts accessible using the FTP protocol (<a href="./rfc959">RFC959</a>).
A FTP URL follow the syntax described in <a href="#section-3.1">Section 3.1</a>. If :<port> is
omitted, the port defaults to 21.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a>. FTP Name and Password</span>
A user name and password may be supplied; they are used in the ftp
"USER" and "PASS" commands after first making the connection to the
FTP server. If no user name or password is supplied and one is
requested by the FTP server, the conventions for "anonymous" FTP are
to be used, as follows:
The user name "anonymous" is supplied.
The password is supplied as the Internet e-mail address
of the end user accessing the resource.
If the URL supplies a user name but no password, and the remote
server requests a password, the program interpreting the FTP URL
should request one from the user.
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a>. FTP url-path</span>
The url-path of a FTP URL has the following syntax:
<cwd1>/<cwd2>/.../<cwdN>/<name>;type=<typecode>
Where <cwd1> through <cwdN> and <name> are (possibly encoded) strings
and <typecode> is one of the characters "a", "i", or "d". The part
";type=<typecode>" may be omitted. The <cwdx> and <name> parts may be
empty. The whole url-path may be omitted, including the "/"
delimiting it from the prefix containing user, password, host, and
port.
The url-path is interpreted as a series of FTP commands as follows:
Each of the <cwd> elements is to be supplied, sequentially, as the
argument to a CWD (change working directory) command.
If the typecode is "d", perform a NLST (name list) command with
<name> as the argument, and interpret the results as a file
directory listing.
Otherwise, perform a TYPE command with <typecode> as the argument,
and then access the file whose name is <name> (for example, using
the RETR command.)
Within a name or CWD component, the characters "/" and ";" are
reserved and must be encoded. The components are decoded prior to
their use in the FTP protocol. In particular, if the appropriate FTP
sequence to access a particular file requires supplying a string
containing a "/" as an argument to a CWD or RETR command, it is
<span class="grey">Berners-Lee, Masinter & McCahill [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
necessary to encode each "/".
For example, the URL <URL:ftp://myname@host.dom/%2Fetc/motd> is
interpreted by FTP-ing to "host.dom", logging in as "myname"
(prompting for a password if it is asked for), and then executing
"CWD /etc" and then "RETR motd". This has a different meaning from
<URL:ftp://myname@host.dom/etc/motd> which would "CWD etc" and then
"RETR motd"; the initial "CWD" might be executed relative to the
default directory for "myname". On the other hand,
<URL:ftp://myname@host.dom//etc/motd>, would "CWD " with a null
argument, then "CWD etc", and then "RETR motd".
FTP URLs may also be used for other operations; for example, it is
possible to update a file on a remote file server, or infer
information about it from the directory listings. The mechanism for
doing so is not spelled out here.
<span class="h4"><a class="selflink" id="section-3.2.3" href="#section-3.2.3">3.2.3</a>. FTP Typecode is Optional</span>
The entire ;type=<typecode> part of a FTP URL is optional. If it is
omitted, the client program interpreting the URL must guess the
appropriate mode to use. In general, the data content type of a file
can only be guessed from the name, e.g., from the suffix of the name;
the appropriate type code to be used for transfer of the file can
then be deduced from the data content of the file.
<span class="h4"><a class="selflink" id="section-3.2.4" href="#section-3.2.4">3.2.4</a> Hierarchy</span>
For some file systems, the "/" used to denote the hierarchical
structure of the URL corresponds to the delimiter used to construct a
file name hierarchy, and thus, the filename will look similar to the
URL path. This does NOT mean that the URL is a Unix filename.
<span class="h4"><a class="selflink" id="section-3.2.5" href="#section-3.2.5">3.2.5</a>. Optimization</span>
Clients accessing resources via FTP may employ additional heuristics
to optimize the interaction. For some FTP servers, for example, it
may be reasonable to keep the control connection open while accessing
multiple URLs from the same server. However, there is no common
hierarchical model to the FTP protocol, so if a directory change
command has been given, it is impossible in general to deduce what
sequence should be given to navigate to another directory for a
second retrieval, if the paths are different. The only reliable
algorithm is to disconnect and reestablish the control connection.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. HTTP</span>
The HTTP URL scheme is used to designate Internet resources
accessible using HTTP (HyperText Transfer Protocol).
The HTTP protocol is specified elsewhere. This specification only
describes the syntax of HTTP URLs.
An HTTP URL takes the form:
http://<host>:<port>/<path>?<searchpart>
where <host> and <port> are as described in <a href="#section-3.1">Section 3.1</a>. If :<port>
is omitted, the port defaults to 80. No user name or password is
allowed. <path> is an HTTP selector, and <searchpart> is a query
string. The <path> is optional, as is the <searchpart> and its
preceding "?". If neither <path> nor <searchpart> is present, the "/"
may also be omitted.
Within the <path> and <searchpart> components, "/", ";", "?" are
reserved. The "/" character may be used within HTTP to designate a
hierarchical structure.
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. GOPHER</span>
The Gopher URL scheme is used to designate Internet resources
accessible using the Gopher protocol.
The base Gopher protocol is described in <a href="./rfc1436">RFC 1436</a> and supports items
and collections of items (directories). The Gopher+ protocol is a set
of upward compatible extensions to the base Gopher protocol and is
described in [<a href="#ref-2" title=""Gopher+: Upward compatible enhancements to the Internet Gopher protocol"">2</a>]. Gopher+ supports associating arbitrary sets of
attributes and alternate data representations with Gopher items.
Gopher URLs accommodate both Gopher and Gopher+ items and item
attributes.
<span class="h4"><a class="selflink" id="section-3.4.1" href="#section-3.4.1">3.4.1</a>. Gopher URL syntax</span>
A Gopher URL takes the form:
gopher://<host>:<port>/<gopher-path>
where <gopher-path> is one of
<gophertype><selector>
<gophertype><selector>%09<search>
<gophertype><selector>%09<search>%09<gopher+_string>
<span class="grey">Berners-Lee, Masinter & McCahill [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
If :<port> is omitted, the port defaults to 70. <gophertype> is a
single-character field to denote the Gopher type of the resource to
which the URL refers. The entire <gopher-path> may also be empty, in
which case the delimiting "/" is also optional and the <gophertype>
defaults to "1".
<selector> is the Gopher selector string. In the Gopher protocol,
Gopher selector strings are a sequence of octets which may contain
any octets except 09 hexadecimal (US-ASCII HT or tab) 0A hexadecimal
(US-ASCII character LF), and 0D (US-ASCII character CR).
Gopher clients specify which item to retrieve by sending the Gopher
selector string to a Gopher server.
Within the <gopher-path>, no characters are reserved.
Note that some Gopher <selector> strings begin with a copy of the
<gophertype> character, in which case that character will occur twice
consecutively. The Gopher selector string may be an empty string;
this is how Gopher clients refer to the top-level directory on a
Gopher server.
<span class="h4"><a class="selflink" id="section-3.4.2" href="#section-3.4.2">3.4.2</a> Specifying URLs for Gopher Search Engines</span>
If the URL refers to a search to be submitted to a Gopher search
engine, the selector is followed by an encoded tab (%09) and the
search string. To submit a search to a Gopher search engine, the
Gopher client sends the <selector> string (after decoding), a tab,
and the search string to the Gopher server.
<span class="h4"><a class="selflink" id="section-3.4.3" href="#section-3.4.3">3.4.3</a> URL syntax for Gopher+ items</span>
URLs for Gopher+ items have a second encoded tab (%09) and a Gopher+
string. Note that in this case, the %09<search> string must be
supplied, although the <search> element may be the empty string.
The <gopher+_string> is used to represent information required for
retrieval of the Gopher+ item. Gopher+ items may have alternate
views, arbitrary sets of attributes, and may have electronic forms
associated with them.
To retrieve the data associated with a Gopher+ URL, a client will
connect to the server and send the Gopher selector, followed by a tab
and the search string (which may be empty), followed by a tab and the
Gopher+ commands.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
<span class="h4"><a class="selflink" id="section-3.4.4" href="#section-3.4.4">3.4.4</a> Default Gopher+ data representation</span>
When a Gopher server returns a directory listing to a client, the
Gopher+ items are tagged with either a "+" (denoting Gopher+ items)
or a "?" (denoting Gopher+ items which have a +ASK form associated
with them). A Gopher URL with a Gopher+ string consisting of only a
"+" refers to the default view (data representation) of the item
while a Gopher+ string containing only a "?" refer to an item with a
Gopher electronic form associated with it.
<span class="h4"><a class="selflink" id="section-3.4.5" href="#section-3.4.5">3.4.5</a> Gopher+ items with electronic forms</span>
Gopher+ items which have a +ASK associated with them (i.e. Gopher+
items tagged with a "?") require the client to fetch the item's +ASK
attribute to get the form definition, and then ask the user to fill
out the form and return the user's responses along with the selector
string to retrieve the item. Gopher+ clients know how to do this but
depend on the "?" tag in the Gopher+ item description to know when to
handle this case. The "?" is used in the Gopher+ string to be
consistent with Gopher+ protocol's use of this symbol.
<span class="h4"><a class="selflink" id="section-3.4.6" href="#section-3.4.6">3.4.6</a> Gopher+ item attribute collections</span>
To refer to the Gopher+ attributes of an item, the Gopher URL's
Gopher+ string consists of "!" or "$". "!" refers to the all of a
Gopher+ item's attributes. "$" refers to all the item attributes for
all items in a Gopher directory.
<span class="h4"><a class="selflink" id="section-3.4.7" href="#section-3.4.7">3.4.7</a> Referring to specific Gopher+ attributes</span>
To refer to specific attributes, the URL's gopher+_string is
"!<attribute_name>" or "$<attribute_name>". For example, to refer to
the attribute containing the abstract of an item, the gopher+_string
would be "!+ABSTRACT".
To refer to several attributes, the gopher+_string consists of the
attribute names separated by coded spaces. For example,
"!+ABSTRACT%20+SMELL" refers to the +ABSTRACT and +SMELL attributes
of an item.
<span class="h4"><a class="selflink" id="section-3.4.8" href="#section-3.4.8">3.4.8</a> URL syntax for Gopher+ alternate views</span>
Gopher+ allows for optional alternate data representations (alternate
views) of items. To retrieve a Gopher+ alternate view, a Gopher+
client sends the appropriate view and language identifier (found in
the item's +VIEW attribute). To refer to a specific Gopher+ alternate
view, the URL's Gopher+ string would be in the form:
<span class="grey">Berners-Lee, Masinter & McCahill [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
+<view_name>%20<language_name>
For example, a Gopher+ string of "+application/postscript%20Es_ES"
refers to the Spanish language postscript alternate view of a Gopher+
item.
<span class="h4"><a class="selflink" id="section-3.4.9" href="#section-3.4.9">3.4.9</a> URL syntax for Gopher+ electronic forms</span>
The gopher+_string for a URL that refers to an item referenced by a
Gopher+ electronic form (an ASK block) filled out with specific
values is a coded version of what the client sends to the server.
The gopher+_string is of the form:
+%091%0D%0A+-1%0D%0A<ask_item1_value>%0D%0A<ask_item2_value>%0D%0A.%0D%0A
To retrieve this item, the Gopher client sends:
<a_gopher_selector><tab>+<tab>1<cr><lf>
+-1<cr><lf>
<ask_item1_value><cr><lf>
<ask_item2_value><cr><lf>
.<cr><lf>
to the Gopher server.
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a>. MAILTO</span>
The mailto URL scheme is used to designate the Internet mailing
address of an individual or service. No additional information other
than an Internet mailing address is present or implied.
A mailto URL takes the form:
mailto:<<a href="./rfc822">rfc822</a>-addr-spec>
where <<a href="./rfc822">rfc822</a>-addr-spec> is (the encoding of an) addr-spec, as
specified in <a href="./rfc822">RFC 822</a> [<a href="#ref-6" title=""Standard for the Format of ARPA Internet Text Messages"">6</a>]. Within mailto URLs, there are no reserved
characters.
Note that the percent sign ("%") is commonly used within <a href="./rfc822">RFC 822</a>
addresses and must be encoded.
Unlike many URLs, the mailto scheme does not represent a data object
to be accessed directly; there is no sense in which it designates an
object. It has a different use than the message/external-body type in
MIME.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
<span class="h3"><a class="selflink" id="section-3.6" href="#section-3.6">3.6</a>. NEWS</span>
The news URL scheme is used to refer to either news groups or
individual articles of USENET news, as specified in <a href="./rfc1036">RFC 1036</a>.
A news URL takes one of two forms:
news:<newsgroup-name>
news:<message-id>
A <newsgroup-name> is a period-delimited hierarchical name, such as
"comp.infosystems.www.misc". A <message-id> corresponds to the
Message-ID of <a href="./rfc1036#section-2.1.5">section 2.1.5 of RFC 1036</a>, without the enclosing "<"
and ">"; it takes the form <unique>@<full_domain_name>. A message
identifier may be distinguished from a news group name by the
presence of the commercial at "@" character. No additional characters
are reserved within the components of a news URL.
If <newsgroup-name> is "*" (as in <URL:news:*>), it is used to refer
to "all available news groups".
The news URLs are unusual in that by themselves, they do not contain
sufficient information to locate a single resource, but, rather, are
location-independent.
<span class="h3"><a class="selflink" id="section-3.7" href="#section-3.7">3.7</a>. NNTP</span>
The nntp URL scheme is an alternative method of referencing news
articles, useful for specifying news articles from NNTP servers (<a href="./rfc977">RFC</a>
<a href="./rfc977">977</a>).
A nntp URL take the form:
nntp://<host>:<port>/<newsgroup-name>/<article-number>
where <host> and <port> are as described in <a href="#section-3.1">Section 3.1</a>. If :<port>
is omitted, the port defaults to 119.
The <newsgroup-name> is the name of the group, while the <article-
number> is the numeric id of the article within that newsgroup.
Note that while nntp: URLs specify a unique location for the article
resource, most NNTP servers currently on the Internet today are
configured only to allow access from local clients, and thus nntp
URLs do not designate globally accessible resources. Thus, the news:
form of URL is preferred as a way of identifying news articles.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
<span class="h3"><a class="selflink" id="section-3.8" href="#section-3.8">3.8</a>. TELNET</span>
The Telnet URL scheme is used to designate interactive services that
may be accessed by the Telnet protocol.
A telnet URL takes the form:
telnet://<user>:<password>@<host>:<port>/
as specified in <a href="#section-3.1">Section 3.1</a>. The final "/" character may be omitted.
If :<port> is omitted, the port defaults to 23. The :<password> can
be omitted, as well as the whole <user>:<password> part.
This URL does not designate a data object, but rather an interactive
service. Remote interactive services vary widely in the means by
which they allow remote logins; in practice, the <user> and
<password> supplied are advisory only: clients accessing a telnet URL
merely advise the user of the suggested username and password.
<span class="h3"><a class="selflink" id="section-3.9" href="#section-3.9">3.9</a>. WAIS</span>
The WAIS URL scheme is used to designate WAIS databases, searches, or
individual documents available from a WAIS database. WAIS is
described in [<a href="#ref-7" title=""WAIS Interface Protocol Prototype Functional Specification"">7</a>]. The WAIS protocol is described in <a href="./rfc1625">RFC 1625</a> [<a href="#ref-17" title=""WAIS over Z39.50-1988"">17</a>];
Although the WAIS protocol is based on Z39.50-1988, the WAIS URL
scheme is not intended for use with arbitrary Z39.50 services.
A WAIS URL takes one of the following forms:
wais://<host>:<port>/<database>
wais://<host>:<port>/<database>?<search>
wais://<host>:<port>/<database>/<wtype>/<wpath>
where <host> and <port> are as described in <a href="#section-3.1">Section 3.1</a>. If :<port>
is omitted, the port defaults to 210. The first form designates a
WAIS database that is available for searching. The second form
designates a particular search. <database> is the name of the WAIS
database being queried.
The third form designates a particular document within a WAIS
database to be retrieved. In this form <wtype> is the WAIS
designation of the type of the object. Many WAIS implementations
require that a client know the "type" of an object prior to
retrieval, the type being returned along with the internal object
identifier in the search response. The <wtype> is included in the
URL in order to allow the client interpreting the URL adequate
information to actually retrieve the document.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
The <wpath> of a WAIS URL consists of the WAIS document-id, encoded
as necessary using the method described in <a href="#section-2.2">Section 2.2</a>. The WAIS
document-id should be treated opaquely; it may only be decomposed by
the server that issued it.
<span class="h3"><a class="selflink" id="section-3.10" href="#section-3.10">3.10</a> FILES</span>
The file URL scheme is used to designate files accessible on a
particular host computer. This scheme, unlike most other URL schemes,
does not designate a resource that is universally accessible over the
Internet.
A file URL takes the form:
file://<host>/<path>
where <host> is the fully qualified domain name of the system on
which the <path> is accessible, and <path> is a hierarchical
directory path of the form <directory>/<directory>/.../<name>.
For example, a VMS file
DISK$USER:[MY.NOTES]NOTE123456.TXT
might become
<URL:file://vms.host.edu/disk$user/my/notes/note12345.txt>
As a special case, <host> can be the string "localhost" or the empty
string; this is interpreted as `the machine from which the URL is
being interpreted'.
The file URL scheme is unusual in that it does not specify an
Internet protocol or access method for such files; as such, its
utility in network protocols between hosts is limited.
<span class="h3"><a class="selflink" id="section-3.11" href="#section-3.11">3.11</a> PROSPERO</span>
The Prospero URL scheme is used to designate resources that are
accessed via the Prospero Directory Service. The Prospero protocol is
described elsewhere [<a href="#ref-14" title=""The Prospero Protocol"">14</a>].
A prospero URLs takes the form:
prospero://<host>:<port>/<hsoname>;<field>=<value>
where <host> and <port> are as described in <a href="#section-3.1">Section 3.1</a>. If :<port>
is omitted, the port defaults to 1525. No username or password is
<span class="grey">Berners-Lee, Masinter & McCahill [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
allowed.
The <hsoname> is the host-specific object name in the Prospero
protocol, suitably encoded. This name is opaque and interpreted by
the Prospero server. The semicolon ";" is reserved and may not
appear without quoting in the <hsoname>.
Prospero URLs are interpreted by contacting a Prospero directory
server on the specified host and port to determine appropriate access
methods for a resource, which might themselves be represented as
different URLs. External Prospero links are represented as URLs of
the underlying access method and are not represented as Prospero
URLs.
Note that a slash "/" may appear in the <hsoname> without quoting and
no significance may be assumed by the application. Though slashes
may indicate hierarchical structure on the server, such structure is
not guaranteed. Note that many <hsoname>s begin with a slash, in
which case the host or port will be followed by a double slash: the
slash from the URL syntax, followed by the initial slash from the
<hsoname>. (E.g., <URL:prospero://host.dom//pros/name> designates a
<hsoname> of "/pros/name".)
In addition, after the <hsoname>, optional fields and values
associated with a Prospero link may be specified as part of the URL.
When present, each field/value pair is separated from each other and
from the rest of the URL by a ";" (semicolon). The name of the field
and its value are separated by a "=" (equal sign). If present, these
fields serve to identify the target of the URL. For example, the
OBJECT-VERSION field can be specified to identify a specific version
of an object.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. REGISTRATION OF NEW SCHEMES</span>
A new scheme may be introduced by defining a mapping onto a
conforming URL syntax, using a new prefix. URLs for experimental
schemes may be used by mutual agreement between parties. Scheme names
starting with the characters "x-" are reserved for experimental
purposes.
The Internet Assigned Numbers Authority (IANA) will maintain a
registry of URL schemes. Any submission of a new URL scheme must
include a definition of an algorithm for accessing of resources
within that scheme and the syntax for representing such a scheme.
URL schemes must have demonstrable utility and operability. One way
to provide such a demonstration is via a gateway which provides
objects in the new scheme for clients using an existing protocol. If
<span class="grey">Berners-Lee, Masinter & McCahill [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
the new scheme does not locate resources that are data objects, the
properties of names in the new space must be clearly defined.
New schemes should try to follow the same syntactic conventions of
existing schemes, where appropriate. It is likewise recommended
that, where a protocol allows for retrieval by URL, that the client
software have provision for being configured to use specific gateway
locators for indirect access through new naming schemes.
The following scheme have been proposed at various times, but this
document does not define their syntax or use at this time. It is
suggested that IANA reserve their scheme names for future definition:
afs Andrew File System global file names.
mid Message identifiers for electronic mail.
cid Content identifiers for MIME body parts.
nfs Network File System (NFS) file names.
tn3270 Interactive 3270 emulation sessions.
mailserver Access to data available from mail servers.
z39.50 Access to ANSI Z39.50 services.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. BNF for specific URL schemes</span>
This is a BNF-like description of the Uniform Resource Locator
syntax, using the conventions of <a href="./rfc822">RFC822</a>, except that "|" is used to
designate alternatives, and brackets [] are used around optional or
repeated elements. Briefly, literals are quoted with "", optional
elements are enclosed in [brackets], and elements may be preceded
with <n>* to designate n or more repetitions of the following
element; n defaults to 0.
; The generic form of a URL is:
genericurl = scheme ":" schemepart
; Specific predefined schemes are defined here; new schemes
; may be registered with IANA
url = httpurl | ftpurl | newsurl |
nntpurl | telneturl | gopherurl |
waisurl | mailtourl | fileurl |
prosperourl | otherurl
; new schemes follow the general syntax
otherurl = genericurl
; the scheme is in lower case; interpreters should use case-ignore
scheme = 1*[ lowalpha | digit | "+" | "-" | "." ]
<span class="grey">Berners-Lee, Masinter & McCahill [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
schemepart = *xchar | ip-schemepart
; URL schemeparts for ip based protocols:
ip-schemepart = "//" login [ "/" urlpath ]
login = [ user [ ":" password ] "@" ] hostport
hostport = host [ ":" port ]
host = hostname | hostnumber
hostname = *[ domainlabel "." ] toplabel
domainlabel = alphadigit | alphadigit *[ alphadigit | "-" ] alphadigit
toplabel = alpha | alpha *[ alphadigit | "-" ] alphadigit
alphadigit = alpha | digit
hostnumber = digits "." digits "." digits "." digits
port = digits
user = *[ uchar | ";" | "?" | "&" | "=" ]
password = *[ uchar | ";" | "?" | "&" | "=" ]
urlpath = *xchar ; depends on protocol see <a href="#section-3.1">section 3.1</a>
; The predefined schemes:
; FTP (see also <a href="./rfc959">RFC959</a>)
ftpurl = "ftp://" login [ "/" fpath [ ";type=" ftptype ]]
fpath = fsegment *[ "/" fsegment ]
fsegment = *[ uchar | "?" | ":" | "@" | "&" | "=" ]
ftptype = "A" | "I" | "D" | "a" | "i" | "d"
; FILE
fileurl = "file://" [ host | "localhost" ] "/" fpath
; HTTP
httpurl = "http://" hostport [ "/" hpath [ "?" search ]]
hpath = hsegment *[ "/" hsegment ]
hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
; GOPHER (see also <a href="./rfc1436">RFC1436</a>)
gopherurl = "gopher://" hostport [ / [ gtype [ selector
[ "%09" search [ "%09" gopher+_string ] ] ] ] ]
gtype = xchar
selector = *xchar
gopher+_string = *xchar
<span class="grey">Berners-Lee, Masinter & McCahill [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
; MAILTO (see also <a href="./rfc822">RFC822</a>)
mailtourl = "mailto:" encoded822addr
encoded822addr = 1*xchar ; further defined in <a href="./rfc822">RFC822</a>
; NEWS (see also <a href="./rfc1036">RFC1036</a>)
newsurl = "news:" grouppart
grouppart = "*" | group | article
group = alpha *[ alpha | digit | "-" | "." | "+" | "_" ]
article = 1*[ uchar | ";" | "/" | "?" | ":" | "&" | "=" ] "@" host
; NNTP (see also <a href="./rfc977">RFC977</a>)
nntpurl = "nntp://" hostport "/" group [ "/" digits ]
; TELNET
telneturl = "telnet://" login [ "/" ]
; WAIS (see also <a href="./rfc1625">RFC1625</a>)
waisurl = waisdatabase | waisindex | waisdoc
waisdatabase = "wais://" hostport "/" database
waisindex = "wais://" hostport "/" database "?" search
waisdoc = "wais://" hostport "/" database "/" wtype "/" wpath
database = *uchar
wtype = *uchar
wpath = *uchar
; PROSPERO
prosperourl = "prospero://" hostport "/" ppath *[ fieldspec ]
ppath = psegment *[ "/" psegment ]
psegment = *[ uchar | "?" | ":" | "@" | "&" | "=" ]
fieldspec = ";" fieldname "=" fieldvalue
fieldname = *[ uchar | "?" | ":" | "@" | "&" ]
fieldvalue = *[ uchar | "?" | ":" | "@" | "&" ]
; Miscellaneous definitions
lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" |
"i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" |
"q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" |
"y" | "z"
hialpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" |
"J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" |
"S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"
<span class="grey">Berners-Lee, Masinter & McCahill [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
alpha = lowalpha | hialpha
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |
"8" | "9"
safe = "$" | "-" | "_" | "." | "+"
extra = "!" | "*" | "'" | "(" | ")" | ","
national = "{" | "}" | "|" | "\" | "^" | "~" | "[" | "]" | "`"
punctuation = "<" | ">" | "#" | "%" | <">
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "="
hex = digit | "A" | "B" | "C" | "D" | "E" | "F" |
"a" | "b" | "c" | "d" | "e" | "f"
escape = "%" hex hex
unreserved = alpha | digit | safe | extra
uchar = unreserved | escape
xchar = unreserved | reserved | escape
digits = 1*digit
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
The URL scheme does not in itself pose a security threat. Users
should beware that there is no general guarantee that a URL which at
one time points to a given object continues to do so, and does not
even at some later time point to a different object due to the
movement of objects on servers.
A URL-related security threat is that it is sometimes possible to
construct a URL such that an attempt to perform a harmless idempotent
operation such as the retrieval of the object will in fact cause a
possibly damaging remote operation to occur. The unsafe URL is
typically constructed by specifying a port number other than that
reserved for the network protocol in question. The client
unwittingly contacts a server which is in fact running a different
protocol. The content of the URL contains instructions which when
interpreted according to this other protocol cause an unexpected
operation. An example has been the use of gopher URLs to cause a rude
message to be sent via a SMTP server. Caution should be used when
using any URL which specifies a port number other than the default
for the protocol, especially when it is a number within the reserved
space.
Care should be taken when URLs contain embedded encoded delimiters
for a given protocol (for example, CR and LF characters for telnet
protocols) that these are not unencoded before transmission. This
would violate the protocol but could be used to simulate an extra
operation or parameter, again causing an unexpected and possible
harmful remote operation to be performed.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
The use of URLs containing passwords that should be secret is clearly
unwise.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Acknowledgements</span>
This paper builds on the basic WWW design (<a href="./rfc1630">RFC 1630</a>) and much
discussion of these issues by many people on the network. The
discussion was particularly stimulated by articles by Clifford Lynch,
Brewster Kahle [<a href="#ref-10" title=""Document Identifiers, or International Standard Book Numbers for the Electronic Age"">10</a>] and Wengyik Yeong [<a href="#ref-18" title=""Towards Networked Information Retrieval"">18</a>]. Contributions from John
Curran, Clifford Neuman, Ed Vielmetti and later the IETF URL BOF and
URI working group were incorporated.
Most recently, careful readings and comments by Dan Connolly, Ned
Freed, Roy Fielding, Guido van Rossum, Michael Dolan, Bert Bos, John
Kunze, Olle Jarnefors, Peter Svanberg and many others have helped
refine this RFC.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
APPENDIX: Recommendations for URLs in Context
URIs, including URLs, are intended to be transmitted through
protocols which provide a context for their interpretation.
In some cases, it will be necessary to distinguish URLs from other
possible data structures in a syntactic structure. In this case, is
recommended that URLs be preceeded with a prefix consisting of the
characters "URL:". For example, this prefix may be used to
distinguish URLs from other kinds of URIs.
In addition, there are many occasions when URLs are included in other
kinds of text; examples include electronic mail, USENET news
messages, or printed on paper. In such cases, it is convenient to
have a separate syntactic wrapper that delimits the URL and separates
it from the rest of the text, and in particular from punctuation
marks that might be mistaken for part of the URL. For this purpose,
is recommended that angle brackets ("<" and ">"), along with the
prefix "URL:", be used to delimit the boundaries of the URL. This
wrapper does not form part of the URL and should not be used in
contexts in which delimiters are already specified.
In the case where a fragment/anchor identifier is associated with a
URL (following a "#"), the identifier would be placed within the
brackets as well.
In some cases, extra whitespace (spaces, linebreaks, tabs, etc.) may
need to be added to break long URLs across lines. The whitespace
should be ignored when extracting the URL.
No whitespace should be introduced after a hyphen ("-") character.
Because some typesetters and printers may (erroneously) introduce a
hyphen at the end of line when breaking a line, the interpreter of a
URL containing a line break immediately after a hyphen should ignore
all unencoded whitespace around the line break, and should be aware
that the hyphen may or may not actually be part of the URL.
Examples:
Yes, Jim, I found it under <URL:ftp://info.cern.ch/pub/www/doc;
type=d> but you can probably pick it up from <URL:ftp://ds.in
ternic.net/rfc>. Note the warning in <URL:http://ds.internic.
net/instructions/overview.html#WARNING>.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
References
[<a id="ref-1">1</a>] Anklesaria, F., McCahill, M., Lindner, P., Johnson, D.,
Torrey, D., and B. Alberti, "The Internet Gopher Protocol
(a distributed document search and retrieval protocol)",
<a href="./rfc1436">RFC 1436</a>, University of Minnesota, March 1993.
<URL:ftp://ds.internic.net/rfc/rfc1436.txt;type=a>
[<a id="ref-2">2</a>] Anklesaria, F., Lindner, P., McCahill, M., Torrey, D.,
Johnson, D., and B. Alberti, "Gopher+: Upward compatible
enhancements to the Internet Gopher protocol",
University of Minnesota, July 1993.
<URL:ftp://boombox.micro.umn.edu/pub/gopher/gopher_protocol
/Gopher+/Gopher+.txt>
[<a id="ref-3">3</a>] Berners-Lee, T., "Universal Resource Identifiers in WWW: A
Unifying Syntax for the Expression of Names and Addresses of
Objects on the Network as used in the World-Wide Web", <a href="./rfc1630">RFC</a>
<a href="./rfc1630">1630</a>, CERN, June 1994.
<URL:ftp://ds.internic.net/rfc/rfc1630.txt>
[<a id="ref-4">4</a>] Berners-Lee, T., "Hypertext Transfer Protocol (HTTP)",
CERN, November 1993.
<URL:ftp://info.cern.ch/pub/www/doc/http-spec.txt.Z>
[<a id="ref-5">5</a>] Braden, R., Editor, "Requirements for Internet Hosts --
Application and Support", STD 3, <a href="./rfc1123">RFC 1123</a>, IETF, October 1989.
<URL:ftp://ds.internic.net/rfc/rfc1123.txt>
[<a id="ref-6">6</a>] Crocker, D. "Standard for the Format of ARPA Internet Text
Messages", STD 11, <a href="./rfc822">RFC 822</a>, UDEL, April 1982.
<URL:ftp://ds.internic.net/rfc/rfc822.txt>
[<a id="ref-7">7</a>] Davis, F., Kahle, B., Morris, H., Salem, J., Shen, T., Wang, R.,
Sui, J., and M. Grinbaum, "WAIS Interface Protocol Prototype
Functional Specification", (v1.5), Thinking Machines
Corporation, April 1990.
<URL:ftp://quake.think.com/pub/wais/doc/protspec.txt>
[<a id="ref-8">8</a>] Horton, M. and R. Adams, "Standard For Interchange of USENET
Messages", <a href="./rfc1036">RFC 1036</a>, AT&T Bell Laboratories, Center for Seismic
Studies, December 1987.
<URL:ftp://ds.internic.net/rfc/rfc1036.txt>
[<a id="ref-9">9</a>] Huitema, C., "Naming: Strategies and Techniques", Computer
Networks and ISDN Systems 23 (1991) 107-110.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
[<a id="ref-10">10</a>] Kahle, B., "Document Identifiers, or International Standard
Book Numbers for the Electronic Age", 1991.
<URL:ftp://quake.think.com/pub/wais/doc/doc-ids.txt>
[<a id="ref-11">11</a>] Kantor, B. and P. Lapsley, "Network News Transfer Protocol:
A Proposed Standard for the Stream-Based Transmission of News",
<a href="./rfc977">RFC 977</a>, UC San Diego & UC Berkeley, February 1986.
<URL:ftp://ds.internic.net/rfc/rfc977.txt>
[<a id="ref-12">12</a>] Kunze, J., "Functional Requirements for Internet Resource
Locators", Work in Progress, December 1994.
<URL:ftp://ds.internic.net/internet-drafts
/draft-ietf-uri-irl-fun-req-02.txt>
[<a id="ref-13">13</a>] Mockapetris, P., "Domain Names - Concepts and Facilities",
STD 13, <a href="./rfc1034">RFC 1034</a>, USC/Information Sciences Institute,
November 1987.
<URL:ftp://ds.internic.net/rfc/rfc1034.txt>
[<a id="ref-14">14</a>] Neuman, B., and S. Augart, "The Prospero Protocol",
USC/Information Sciences Institute, June 1993.
<URL:ftp://prospero.isi.edu/pub/prospero/doc
/prospero-protocol.PS.Z>
[<a id="ref-15">15</a>] Postel, J. and J. Reynolds, "File Transfer Protocol (FTP)",
STD 9, <a href="./rfc959">RFC 959</a>, USC/Information Sciences Institute,
October 1985.
<URL:ftp://ds.internic.net/rfc/rfc959.txt>
[<a id="ref-16">16</a>] Sollins, K. and L. Masinter, "Functional Requirements for
Uniform Resource Names", <a href="./rfc1737">RFC 1737</a>, MIT/LCS, Xerox Corporation,
December 1994.
<URL:ftp://ds.internic.net/rfc/rfc1737.txt>
[<a id="ref-17">17</a>] St. Pierre, M, Fullton, J., Gamiel, K., Goldman, J., Kahle, B.,
Kunze, J., Morris, H., and F. Schiettecatte, "WAIS over
Z39.50-1988", <a href="./rfc1625">RFC 1625</a>, WAIS, Inc., CNIDR, Thinking Machines
Corp., UC Berkeley, FS Consulting, June 1994.
<URL:ftp://ds.internic.net/rfc/rfc1625.txt>
[<a id="ref-18">18</a>] Yeong, W. "Towards Networked Information Retrieval", Technical
report 91-06-25-01, Performance Systems International, Inc.
<URL:ftp://uu.psi.com/wp/nir.txt>, June 1991.
[<a id="ref-19">19</a>] Yeong, W., <a style="text-decoration: none" href='https://www.google.com/search?sitesearch=datatracker.ietf.org%2Fdoc%2Fhtml%2F&q=inurl:draft-+%22Representing+Public+Archives+in+the+Directory%22'>"Representing Public Archives in the Directory"</a>,
Work in Progress, November 1991.
<span class="grey">Berners-Lee, Masinter & McCahill [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc1738">RFC 1738</a> Uniform Resource Locators (URL) December 1994</span>
[<a id="ref-20">20</a>] "Coded Character Set -- 7-bit American Standard Code for
Information Interchange", ANSI X3.4-1986.
Editors' Addresses
Tim Berners-Lee
World-Wide Web project
CERN,
<span class="h2"><a class="selflink" id="section-1211" href="#section-1211">1211</a> Geneva 23,</span>
Switzerland
Phone: +41 (22)767 3755
Fax: +41 (22)767 7155
EMail: timbl@info.cern.ch
Larry Masinter
Xerox PARC
<span class="h2"><a class="selflink" id="section-3333" href="#section-3333">3333</a> Coyote Hill Road</span>
Palo Alto, CA 94034
Phone: (415) 812-4365
Fax: (415) 812-4333
EMail: masinter@parc.xerox.com
Mark McCahill
Computer and Information Services,
University of Minnesota
Room 152 Shepherd Labs
<span class="h2"><a class="selflink" id="section-100" href="#section-100">100</a> Union Street SE</span>
Minneapolis, MN 55455
Phone: (612) 625 1300
EMail: mpm@boombox.micro.umn.edu
Berners-Lee, Masinter & McCahill [Page 25]
</pre>
|