home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1600s / rfc1630.txt < prev    next >
Text File  |  1994-06-06  |  58KB  |  1,572 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                     T. Berners-Lee
  8. Request for Comments: 1630                                          CERN
  9. Category: Informational                                        June 1994
  10.  
  11.  
  12.                  Universal Resource Identifiers in WWW
  13.  
  14.                 A Unifying Syntax for the Expression of
  15.              Names and Addresses of Objects on the Network
  16.                      as used in the World-Wide Web
  17.  
  18. Status of this Memo
  19.  
  20.    This memo provides information for the Internet community.  This memo
  21.    does not specify an Internet standard of any kind.  Distribution of
  22.    this memo is unlimited.
  23.  
  24. IESG Note:
  25.  
  26.    Note that the work contained in this memo does not describe an
  27.    Internet standard.  An Internet standard for general Resource
  28.    Identifiers is under development within the IETF.
  29.  
  30. Introduction
  31.  
  32.    This document defines the syntax used by the World-Wide Web
  33.    initiative to encode the names and addresses of objects on the
  34.    Internet.  The web is considered to include objects accessed using an
  35.    extendable number of protocols, existing, invented for the web
  36.    itself, or to be invented in the future.  Access instructions for an
  37.    individual object under a given protocol are encoded into forms of
  38.    address string.  Other protocols allow the use of object names of
  39.    various forms.  In order to abstract the idea of a generic object,
  40.    the web needs the concepts of the universal set of objects, and of
  41.    the universal set of names or addresses of objects.
  42.  
  43.    A Universal Resource Identifier (URI) is a member of this universal
  44.    set of names in registered name spaces and addresses referring to
  45.    registered protocols or name spaces.  A Uniform Resource Locator
  46.    (URL), defined elsewhere, is a form of URI which expresses an address
  47.    which maps onto an access algorithm using network protocols. Existing
  48.    URI schemes which correspond to the (still mutating) concept of IETF
  49.    URLs are listed here. The Uniform Resource Name (URN) debate attempts
  50.    to define a name space (and presumably resolution protocols) for
  51.    persistent object names. This area is not addressed by this document,
  52.    which is written in order to document existing practice and provide a
  53.    reference point for URL and URN discussions.
  54.  
  55.  
  56.  
  57.  
  58. Berners-Lee                                                     [Page 1]
  59.  
  60. RFC 1630                      URIs in WWW                      June 1994
  61.  
  62.  
  63.    The world-wide web protocols are discussed on the mailing list www-
  64.    talk-request@info.cern.ch and the newsgroup comp.infosystems.www is
  65.    preferable for beginner's questions. The mailing list uri-
  66.    request@bunyip.com has discussion related particularly to the URI
  67.    issue.  The author may be contacted as timbl@info.cern.ch.
  68.  
  69.    This document is available in hypertext form at:
  70.  
  71.    http://info.cern.ch/hypertext/WWW/Addressing/URL/URI_Overview.html
  72.  
  73. The Need For a Universal Syntax
  74.  
  75.    This section describes the concept of the URI and does not form part
  76.    of the specification.
  77.  
  78.    Many protocols and systems for document search and retrieval are
  79.    currently in use, and many more protocols or refinements of existing
  80.    protocols are to be expected in a field whose expansion is explosive.
  81.  
  82.    These systems are aiming to achieve global search and readership of
  83.    documents across differing computing platforms, and despite a
  84.    plethora of protocols and data formats.  As protocols evolve,
  85.    gateways can allow global access to remain possible. As data formats
  86.    evolve, format conversion programs can preserve global access.  There
  87.    is one area, however, in which it is impractical to make conversions,
  88.    and that is in the names and addresses used to identify objects.
  89.    This is because names and addresses of objects are passed on in so
  90.    many ways, from the backs of envelopes to hypertext objects, and may
  91.    have a long life.
  92.  
  93.    A common feature of almost all the data models of past and proposed
  94.    systems is something which can be mapped onto a concept of "object"
  95.    and some kind of name, address, or identifier for that object.  One
  96.    can therefore define a set of name spaces in which these objects can
  97.    be said to exist.
  98.  
  99.    Practical systems need to access and mix objects which are part of
  100.    different existing and proposed systems.  Therefore, the concept of
  101.    the universal set of all objects, and hence the universal set of
  102.    names and addresses, in all name spaces, becomes important.  This
  103.    allows names in different spaces to be treated in a common way, even
  104.    though names in different spaces have differing characteristics, as
  105.    do the objects to which they refer.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Berners-Lee                                                     [Page 2]
  115.  
  116. RFC 1630                      URIs in WWW                      June 1994
  117.  
  118.  
  119.    URIs
  120.  
  121.       This document defines a way to encapsulate a name in any
  122.       registered name space, and label it with the the name space,
  123.       producing a member of the universal set.  Such an encoded and
  124.       labelled member of this set is known as a Universal Resource
  125.       Identifier, or URI.
  126.  
  127.       The universal syntax allows access of objects available using
  128.       existing protocols, and may be extended with technology.
  129.  
  130.       The specification of the URI syntax does not imply anything about
  131.       the properties of names and addresses in the various name spaces
  132.       which are mapped onto the set of URI strings.  The properties
  133.       follow from the specifications of the protocols and the associated
  134.       usage conventions for each scheme.
  135.  
  136.    URLs
  137.  
  138.       For existing Internet access protocols, it is necessary in most
  139.       cases to define the encoding of the access algorithm into
  140.       something concise enough to be termed address.  URIs which refer
  141.       to objects accessed with existing protocols are known as "Uniform
  142.       Resource Locators" (URLs) and are listed here as used in WWW, but
  143.       to be formally defined in a separate document.
  144.  
  145.    URNs
  146.  
  147.       There is currently a drive to define a space of more persistent
  148.       names than any URLs.  These "Uniform Resource Names" are the
  149.       subject of an IETF working group's discussions.  (See Sollins and
  150.       Masinter, Functional Specifications for URNs, circulated
  151.       informally.)
  152.  
  153.       The URI syntax and URL forms have been in widespread use by
  154.       World-Wide Web software since 1990.
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Berners-Lee                                                     [Page 3]
  171.  
  172. RFC 1630                      URIs in WWW                      June 1994
  173.  
  174.  
  175. Design Criteria and Choices
  176.  
  177.    This section is not part of the specification: it is simply an
  178.    explanation of the way in which the specification was derived.
  179.  
  180.    Design criteria
  181.  
  182.       The syntax was designed to be:
  183.  
  184.       Extensible              New naming schemes may be added later.
  185.  
  186.       Complete                It is possible to encode any naming
  187.                               scheme.
  188.  
  189.       Printable               It is possible to express any URI using
  190.                               7-bit ASCII characters so that URIs may,
  191.                               if necessary, be passed using pen and ink.
  192.  
  193.    Choices for a universal syntax
  194.  
  195.       For the syntax itself there is little choice except for the order
  196.       and punctuation of the elements, and the acceptable characters and
  197.       escaping rules.
  198.  
  199.       The extensibility requirement is met by allowing an arbitrary (but
  200.       registered) string to be used as a prefix.  A prefix is chosen as
  201.       left to right parsing is more common than right to left.  The
  202.       choice of a colon as separator of the prefix from the rest of the
  203.       URI was arbitrary.
  204.  
  205.       The decoding of the rest of the string is defined as a function of
  206.       the prefix.  New prefixed are introduced for new schemes as
  207.       necessary, in agreement with the registration authority.  The
  208.       registration of a new scheme clearly requires the definition of
  209.       the decoding of the URI into a given name space, and a definition
  210.       of the properties and, where applicable, resolution protocols, for
  211.       the name space.
  212.  
  213.       The completeness requirement is easily met by allowing
  214.       particularly strange or plain binary names to be encoded in base
  215.       16 or 64 using the acceptable characters.
  216.  
  217.       The printability requirement could have been met by requiring all
  218.       schemes to encode characters not part of a basic set.  This led to
  219.       many discussions of what the basic set should be.  A difficult
  220.       case, for example, is when an ISO latin 1 string appears in a URL,
  221.       and within an application with ISO Latin-1 capability, it can be
  222.       handled intact.  However, for transport in general, the non-ASCII
  223.  
  224.  
  225.  
  226. Berners-Lee                                                     [Page 4]
  227.  
  228. RFC 1630                      URIs in WWW                      June 1994
  229.  
  230.  
  231.       characters need to be escaped.
  232.  
  233.       The solution to this was to specify a safe set of characters, and
  234.       a general escaping scheme which may be used for encoding "unsafe"
  235.       characters.  This "safe" set is suitable, for example, for use in
  236.       electronic mail.  This is the canonical form of a URI.
  237.  
  238.       The choice of escape character for introducing representations of
  239.       non-allowed characters also tends to be a matter of taste.  An
  240.       ANSI standard exists in the C language, using the back-slash
  241.       character "\".  The use of this character on unix command lines,
  242.       however, can be a problem as it is interpreted by many shell
  243.       programs, and would have itself to be escaped.  It is also a
  244.       character which is not available on certain keyboards.  The equals
  245.       sign is commonly used in the encoding of names having
  246.       attribute=value pairs.  The percent sign was eventually chosen as
  247.       a suitable escape character.
  248.  
  249.       There is a conflict between the need to be able to represent many
  250.       characters including spaces within a URI directly, and the need to
  251.       be able to use a URI in environments which have limited character
  252.       sets or in which certain characters are prone to corruption.  This
  253.       conflict has been resolved by use of an hexadecimal escaping
  254.       method which may be applied to any characters forbidden in a given
  255.       context.  When URLs are moved between contexts, the set of
  256.       characters escaped may be enlarged or reduced unambiguously.
  257.  
  258.       The use of white space characters is risky in URIs to be printed
  259.       or sent by electronic mail, and the use of multiple white space
  260.       characters is very risky.  This is because of the frequent
  261.       introduction of extraneous white space when lines are wrapped by
  262.       systems such as mail, or sheer necessity of narrow column width,
  263.       and because of the inter-conversion of various forms of white
  264.       space which occurs during character code conversion and the
  265.       transfer of text between applications.  This is why the canonical
  266.       form for URIs has all white spaces encoded.
  267.  
  268. Reommendations
  269.  
  270.    This section describes the syntax for URIs as used in the WorldWide
  271.    Web initiative.  The generic syntax provides a framework for new
  272.    schemes for names to be resolved using as yet undefined protocols.
  273.  
  274. URI syntax
  275.  
  276.    A complete URI consists of a naming scheme specifier followed by a
  277.    string whose format is a function of the naming scheme.  For locators
  278.    of information on the Internet, a common syntax is used for the IP
  279.  
  280.  
  281.  
  282. Berners-Lee                                                     [Page 5]
  283.  
  284. RFC 1630                      URIs in WWW                      June 1994
  285.  
  286.  
  287.    address part. A BNF description of the URL syntax is given in an a
  288.    later section. The components are as follows.  Fragment identifiers
  289.    and relative URIs are not involved in the basic URL definition.
  290.  
  291.    SCHEME
  292.  
  293.       Within the URI of a object, the first element is the name of the
  294.       scheme, separated from the rest of the object by a colon.
  295.  
  296.    PATH
  297.  
  298.       The rest of the URI follows the colon in a format depending on the
  299.       scheme. The path is interpreted in a manner dependent on the
  300.       protocol being used.  However, when it contains slashes, these
  301.       must imply a hierarchical structure.
  302.  
  303. Reserved characters
  304.  
  305.    The path in the URI has a significance defined by the particular
  306.    scheme.  Typically, it is used to encode a name in a given name
  307.    space, or an algorithm for accessing an object.  In either case, the
  308.    encoding may use those characters allowed by the BNF syntax, or
  309.    hexadecimal encoding of other characters.
  310.  
  311.    Some of the reserved characters have special uses as defined here.
  312.  
  313.    THE PERCENT SIGN
  314.  
  315.       The percent sign ("%", ASCII 25 hex) is used as the escape
  316.       character in the encoding scheme and is never allowed for anything
  317.       else.
  318.  
  319.    HIERARCHICAL FORMS
  320.  
  321.       The slash ("/", ASCII 2F hex) character is reserved for the
  322.       delimiting of substrings whose relationship is hierarchical.  This
  323.       enables partial forms of the URI.  Substrings consisting of single
  324.       or double dots ("." or "..") are similarly reserved.
  325.  
  326.       The significance of the slash between two segments is that the
  327.       segment of the path to the left is more significant than the
  328.       segment of the path to the right.  ("Significance" in this case
  329.       refers solely to closeness to the root of the hierarchical
  330.       structure and makes no value judgement!)
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Berners-Lee                                                     [Page 6]
  339.  
  340. RFC 1630                      URIs in WWW                      June 1994
  341.  
  342.  
  343.       Note
  344.  
  345.          The similarity to unix and other disk operating system filename
  346.          conventions should be taken as purely coincidental, and should
  347.          not be taken to indicate that URIs should be interpreted as
  348.          file names.
  349.  
  350.    HASH FOR FRAGMENT IDENTIFIERS
  351.  
  352.       The hash ("#", ASCII 23 hex) character is reserved as a delimiter
  353.       to separate the URI of an object from a fragment identifier .
  354.  
  355.    QUERY STRINGS
  356.  
  357.       The question mark ("?", ASCII 3F hex) is used to delimit the
  358.       boundary between the URI of a queryable object, and a set of words
  359.       used to express a query on that object.  When this form is used,
  360.       the combined URI stands for the object which results from the
  361.       query being applied to the original object.
  362.  
  363.       Within the query string, the plus sign is reserved as shorthand
  364.       notation for a space.  Therefore, real plus signs must be encoded.
  365.       This method was used to make query URIs easier to pass in systems
  366.       which did not allow spaces.
  367.  
  368.       The query string represents some operation applied to the object,
  369.       but this specification gives no common syntax or semantics for it.
  370.       In practice the syntax and sematics may depend on the scheme and
  371.       may even on the base URI.
  372.  
  373.    OTHER RESERVED CHARACTERS
  374.  
  375.       The astersik ("*", ASCII 2A hex) and exclamation mark ("!" , ASCII
  376.       21 hex) are reserved for use as having special signifiance within
  377.       specific schemes.
  378.  
  379. Unsafe characters
  380.  
  381.    In canonical form, certain characters such as spaces, control
  382.    characters, some characters whose ASCII code is used differently in
  383.    different national character variant 7 bit sets, and all 8bit
  384.    characters beyond DEL (7F hex) of the ISO Latin-1 set, shall not be
  385.    used unencoded. This is a recommendation for trouble-free
  386.    interchange, and as indicated below, the encoded set may be extended
  387.    or reduced.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Berners-Lee                                                     [Page 7]
  395.  
  396. RFC 1630                      URIs in WWW                      June 1994
  397.  
  398.  
  399. Encoding reserved characters
  400.  
  401.    When a system uses a local addressing scheme, it is useful to provide
  402.    a mapping from local addresses into URIs so that references to
  403.    objects within the addressing scheme may be referred to globally, and
  404.    possibly accessed through gateway servers.
  405.  
  406.    For a new naming scheme, any mapping scheme may be defined provided
  407.    it is unambiguous, reversible, and provides valid URIs.  It is
  408.    recommended that where hierarchical aspects to the local naming
  409.    scheme exist, they be mapped onto the hierarchical URL path syntax in
  410.    order to allow the partial form to be used.
  411.  
  412.    It is also recommended that the conventional scheme below be used in
  413.    all cases except for any scheme which encodes binary data as opposed
  414.    to text, in which case a more compact encoding such as pure
  415.    hexadecimal or base 64 might be more appropriate.  For example, the
  416.    conventional URI encoding method is used for mapping WAIS, FTP,
  417.    Prospero and Gopher addresses in the URI specification.
  418.  
  419.    CONVENTIONAL URI ENCODING SCHEME
  420.  
  421.       Where the local naming scheme uses ASCII characters which are not
  422.       allowed in the URI, these may be represented in the URL by a
  423.       percent sign "%" immediately followed by two hexadecimal digits
  424.       (0-9, A-F) giving the ISO Latin 1 code for that character.
  425.       Character codes other than those allowed by the syntax shall not
  426.       be used unencoded in a URI.
  427.  
  428.    REDUCED OR INCREASED SAFE CHARACTER SETS
  429.  
  430.       The same encoding method may be used for encoding characters whose
  431.       use, although technically allowed in a URI, would be unwise due to
  432.       problems of corruption by imperfect gateways or misrepresentation
  433.       due to the use of variant character sets, or which would simply be
  434.       awkward in a given environment.  Because a % sign always indicates
  435.       an encoded character, a URI may be made "safer" simply by encoding
  436.       any characters considered unsafe, while leaving already encoded
  437.       characters still encoded.  Similarly, in cases where a larger set
  438.       of characters is acceptable, % signs can be selectively and
  439.       reversibly expanded.
  440.  
  441.       Before two URIs can be compared, it is therefore necessary to
  442.       bring them to the same encoding level.
  443.  
  444.       However, the reserved characters mentioned above have a quite
  445.       different significance when encoded, and so may NEVER be encoded
  446.       and unencoded in this way.
  447.  
  448.  
  449.  
  450. Berners-Lee                                                     [Page 8]
  451.  
  452. RFC 1630                      URIs in WWW                      June 1994
  453.  
  454.  
  455.       The percent sign intended as such must always be encoded, as its
  456.       presence otherwise always indicates an encoding.  Sequences which
  457.       start with a percent sign but are not followed by two hexadecimal
  458.       characters are reserved for future extension.  (See Example 3.)
  459.  
  460.    Example 1
  461.  
  462.    The URIs
  463.  
  464.                 http://info.cern.ch/albert/bertram/marie-claude
  465.  
  466.    and
  467.  
  468.                 http://info.cern.ch/albert/bertram/marie%2Dclaude
  469.  
  470.    are identical, as the %2D encodes a hyphen character.
  471.  
  472.    Example 2
  473.  
  474.    The URIs
  475.  
  476.                 http://info.cern.ch/albert/bertram/marie-claude
  477.  
  478.    and
  479.  
  480.                 http://info.cern.ch/albert/bertram%2Fmarie-claude
  481.  
  482.    are NOT identical, as in the second case the encoded slash does not
  483.    have hierarchical significance.
  484.  
  485.    Example 3
  486.  
  487.    The URIs
  488.  
  489.                 fxqn:/us/va/reston/cnri/ietf/24/asdf%*.fred
  490.  
  491.    and
  492.  
  493.                 news:12345667123%asdghfh@info.cern.ch
  494.  
  495.    are illegal, as all % characters imply encodings, and there is no
  496.    decoding defined for "%*"  or "%as" in this recommendation.
  497.  
  498. Partial (relative) form
  499.  
  500.    Within a object whose URI is well defined, the URI of another object
  501.    may be given in abbreviated form, where parts of the two URIs are the
  502.    same. This allows objects within a group to refer to each other
  503.  
  504.  
  505.  
  506. Berners-Lee                                                     [Page 9]
  507.  
  508. RFC 1630                      URIs in WWW                      June 1994
  509.  
  510.  
  511.    without requiring the space for a complete reference, and it
  512.    incidentally allows the group of objects to be moved without changing
  513.    any references.  It must be emphasized that when a reference is
  514.    passed in anything other than a well controlled context, the full
  515.    form must always be used.
  516.  
  517.    In the World-Wide Web applications, the context URI is that of the
  518.    document or object containing a reference. In this case partial URIs
  519.    can be generated in virtual objects or stored in real objects,
  520.    without the need for dramatic change if the higher-order parts of a
  521.    hierarchical naming system are modified.  Apart from terseness, this
  522.    gives greater robustness to practical systems, by enabling
  523.    information hiding between system components.
  524.  
  525.    The partial form relies on a property of the URI syntax that certain
  526.    characters ("/") and certain path elements ("..", ".") have a
  527.    significance reserved for representing a hierarchical space, and must
  528.    be recognized as such by both clients and servers.
  529.  
  530.    A partial form can be distinguished from an absolute form in that the
  531.    latter must have a colon and that colon must occur before any slash
  532.    characters. Systems not requiring partial forms should not use any
  533.    unencoded slashes in their naming schemes.  If they do, absolute URIs
  534.    will still work, but confusion may result. (See note on Gopher
  535.    below.)
  536.  
  537.    The rules for the use of a partial name relative to the URI of the
  538.    context are:
  539.  
  540.       If the scheme parts are different, the whole absolute URI must
  541.       be given.  Otherwise, the scheme is omitted, and:
  542.  
  543.       If the partial URI starts with a non-zero number of consecutive
  544.       slashes, then everything from the context URI up to (but not
  545.       including) the first occurrence of exactly the same number of
  546.       consecutive slashes which has no greater number of consecutive
  547.       slashes anywhere to the right of it is taken to be the same and
  548.       so prepended to the partial URL to form the full URL. Otherwise:
  549.  
  550.       The last part of the path of the context URI (anything following
  551.       the rightmost slash) is removed, and the given partial URI
  552.       appended in its place, and then:
  553.  
  554.       Within the result, all occurrences of "xxx/../" or "/." are
  555.       recursively removed, where xxx, ".." and "." are complete path
  556.       elements.
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Berners-Lee                                                    [Page 10]
  563.  
  564. RFC 1630                      URIs in WWW                      June 1994
  565.  
  566.  
  567.       Note: Trailing slashes
  568.  
  569.    If a path of the context locator ends in slash, partial URIs are
  570.    treated differently to the URI with the same path but without a
  571.    trailing slash. The trailing slash indicates a void segment of the
  572.    path.
  573.  
  574.       Note: Gopher
  575.  
  576.    The gopher system does not have the concept of relative URIs, and the
  577.    gopher community currently allows / as data characters in gopher URIs
  578.    without escaping them to %2F.  Relative forms may not in general be
  579.    used for documents served by gopher servers.  If they are used, then
  580.    WWW software assumes, normally correctly, that in fact they do have
  581.    hierarchical significance despite the specifications. The use of HTTP
  582.    rather than gopher protocol is however recommended.
  583.  
  584.    Examples
  585.  
  586.    In the context of URI
  587.  
  588.                         magic://a/b/c//d/e/f
  589.  
  590.    the partial URIs would expand as follows:
  591.  
  592.    g                       magic://a/b/c//d/e/g
  593.  
  594.    /g                      magic://a/g
  595.  
  596.    //g                     magic://g
  597.  
  598.    ../g                    magic://a/b/c//d/g
  599.  
  600.    g:h                     g:h
  601.  
  602.    and in the context of the URI
  603.  
  604.                            magic://a/b/c//d/e/
  605.  
  606.    the results would be exactly the same.
  607.  
  608. Fragment-id
  609.  
  610.    This represents a part of, fragment of, or a sub-function within, an
  611.    object.  Its syntax and semantics are defined by the application
  612.    responsible for the object, or the specification of the content type
  613.    of the object.  The only definition here is of the allowed characters
  614.    by which it may be represented in a URL.
  615.  
  616.  
  617.  
  618. Berners-Lee                                                    [Page 11]
  619.  
  620. RFC 1630                      URIs in WWW                      June 1994
  621.  
  622.  
  623.    Specific syntaxes for representing fragments in text documents by
  624.    line and character range, or in graphics by coordinates, or in
  625.    structured documents using ladders, are suitable for standardization
  626.    but not defined here.
  627.  
  628.    The fragment-id follows the URL of the whole object from which it is
  629.    separated by a hash sign (#).  If the fragment-id is void, the hash
  630.    sign may be omitted: A void fragment-id with or without the hash sign
  631.    means that the URL refers to the whole object.
  632.  
  633.    While this hook is allowed for identification of fragments, the
  634.    question of addressing of parts of objects, or of the grouping of
  635.    objects and relationship between continued and containing objects, is
  636.    not addressed by this document.
  637.  
  638.    Fragment identifiers do NOT address the question of objects which are
  639.    different versions of a "living" object, nor of expressing the
  640.    relationships between different versions and the living object.
  641.  
  642.    There is no implication that a fragment identifier refers to anything
  643.    which can be extracted as an object in its own right.  It may, for
  644.    example, refer to an indivisible point within an object.
  645.  
  646. Specific Schemes
  647.  
  648.    The mapping for URIs onto some existing standard and experimental
  649.    protocols is outlined in the BNF syntax definition.  Notes on
  650.    particular protocols follow.  These URIs are frequently referred to
  651.    as URLs, though the exact definition of the term URL is still under
  652.    discussion (March 1993).  The schemes covered are:
  653.  
  654.    http                    Hypertext Transfer Protocol (examples)
  655.  
  656.    ftp                     File Transfer protocol
  657.  
  658.    gopher                  Gopher protocol
  659.  
  660.    mailto                  Electronic mail address
  661.  
  662.    news                    Usenet news
  663.  
  664.    telnet, rlogin and tn3270
  665.                            Reference to interactive sessions
  666.  
  667.    wais                    Wide Area Information Servers
  668.  
  669.    file                    Local file access
  670.  
  671.  
  672.  
  673.  
  674. Berners-Lee                                                    [Page 12]
  675.  
  676. RFC 1630                      URIs in WWW                      June 1994
  677.  
  678.  
  679.    The following schemes are proposed as essential to the unification of
  680.    the web with electronic mail, but not currently (to the author's
  681.    knowledge) implemented:
  682.  
  683.    mid                     Message identifiers for electronic mail
  684.  
  685.    cid                     Content identifiers for MIME body part
  686.  
  687.    The schemes for X.500, network management database, and Whois++ have
  688.    not been specified and may be the subject of further study.  Schemes
  689.    for Prospero, and restricted NNTP use are not currently implemented
  690.    as far as the author is aware.
  691.  
  692.    The "urn" prefix is reserved for use in encoding a Uniform Resource
  693.    Name when that has been developed by the IETF working group.
  694.  
  695.    New schemes may be registered at a later time.
  696.  
  697. HTTP
  698.  
  699.    The HTTP protocol specifies that the path is handled transparently by
  700.    those who handle URLs, except for the servers which de-reference
  701.    them.  The path is passed by the client to the server with any
  702.    request, but is not otherwise understood by the client.
  703.  
  704.    The host details are not passed on to the client when the URL is an
  705.    HTTP URL which refers to the server in question.  In this case the
  706.    string sent starts with the slash which follows the host details.
  707.    However, when an HTTP server is being used as a gateway (or "proxy")
  708.    then the entire URI, whether HTTP or some other scheme, is passed on
  709.    the HTTP command line.  The search part, if present, is sent as part
  710.    of the HTTP command, and may in this respect be treated as part of
  711.    the path.  No fragmentid part of a WWW URI (the hash sign and
  712.    following) is sent with the request.  Spaces and control characters
  713.    in URLs must be escaped for transmission in HTTP, as must other
  714.    disallowed characters.
  715.  
  716.    EXAMPLES
  717.  
  718.       These examples are not part of the specification: they are
  719.       provided as illustations only.  The URI of the "welcome" page to a
  720.       server is conventionally
  721.  
  722.          http://www.my.work.com/
  723.  
  724.          As the rest of the URL (after the hostname an port) is opaque
  725.          to the client, it shows great variety but the following are all
  726.          fairly typical.
  727.  
  728.  
  729.  
  730. Berners-Lee                                                    [Page 13]
  731.  
  732. RFC 1630                      URIs in WWW                      June 1994
  733.  
  734.  
  735. http://www.my.uni.edu/info/matriculation/enroling.html
  736.  
  737. http://info.my.org/AboutUs/Phonebook
  738.  
  739. http://www.library.my.town.va.us/Catalogue/76523471236%2Fwen44--4.98
  740.  
  741. http://www.my.org/462F4F2D4241522A314159265358979323846
  742.  
  743.    A URL for a server on a different port to 80 looks like
  744.  
  745.         http://info.cern.ch:8000/imaginary/test
  746.  
  747.    A reference to a particular part of a document may, including the
  748.    fragment identifier, look like
  749.  
  750.         http://www.myu.edu/org/admin/people#andy
  751.  
  752.    in which case the string "#andy" is not sent to the server, but is
  753.    retained by the client and used when the whole object had been
  754.    retrieved.
  755.  
  756.     A search on a text database might look like
  757.  
  758.         http://info.my.org/AboutUs/Index/Phonebook?dobbins
  759.  
  760.    and on another database
  761.  
  762.         http://info.cern.ch/RDB/EMP?*%20where%20name%%3Ddobbins
  763.  
  764.    In all cases the client passes the path string to the server
  765.    uninterpreted, and for the client to deduce anything from
  766.  
  767. FTP
  768.  
  769.    The ftp: prefix indicates that the FTP protocol is used, as defined
  770.    in STD 9, RFC 959 or any successor.  The port number, if present,
  771.    gives the port of the FTP server if not the FTP default.
  772.  
  773.    User name and password
  774.  
  775.       The syntax allows for the inclusion of a user name and even a
  776.       password for those systems which do not use the anonymous FTP
  777.       convention. The default, however, if no user or password is
  778.       supplied, will be to use that convention, viz. that the user name
  779.       is "anonymous" and the password the user's Internet-style mail
  780.       address.
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Berners-Lee                                                    [Page 14]
  787.  
  788. RFC 1630                      URIs in WWW                      June 1994
  789.  
  790.  
  791.       Where possible, this mail address should correspond to a usable
  792.       mail address for the user, and preferably give a DNS host name
  793.       which resolves to the IP address of the client.  Note that servers
  794.       currently vary in their treatment of the anonymous password.
  795.  
  796.    Path
  797.  
  798.       The FTP protocol allows for a sequence of CWD commands (change
  799.       working directory) and a TYPE command prior to service commands
  800.       such as RETR (retrieve) or NLIST (etc.) which actually access a
  801.       file.
  802.  
  803.       The arguments of any CWD commands are successive segment parts of
  804.       the URL delimited by slash, and the final segment is suitable as
  805.       the filename argument to the RETR command for retrieval or the
  806.       directory argument to NLIST.
  807.  
  808.       For some file systems (Unix in particular), the "/" used to denote
  809.       the hierarchical structure of the URL corresponds to the delimiter
  810.       used to construct a file name hierarchy, and thus, the filename
  811.       will look the same as the URL path.  This does NOT mean that the
  812.       URL is a Unix filename.
  813.  
  814.          Note: Retrieving subsequent URLs from the same host
  815.  
  816.       There is no common hierarchical model to the FTP protocol, so if a
  817.       directory change command has been given, it is impossible in
  818.       general to deduce what sequence should be given to navigate to
  819.       another directory for a second retrieval, if the paths are
  820.       different.  The only reliable algorithm is to disconnect and
  821.       reestablish the control connection.
  822.  
  823.    Data type
  824.  
  825.       The data content type of a file can only, in the general FTP case,
  826.       be deduced from the name, normally the suffix of the name.  This
  827.       is not standardized. An alternative is for it to be transferred in
  828.       information outside the URL.  A suitable FTP transfer type (for
  829.       example binary "I" or text "A") must in turn be deduced from the
  830.       data content type.  It is recommended that conventions for
  831.       suffixes of public archives be established, but it is outside the
  832.       scope of this standard.
  833.  
  834.       An FTP URL may optionally specify the FTP data transfer type by
  835.       which an object is to be retrieved. Most of the methods correspond
  836.       to the FTP "Data Types" ASCII and IMAGE for the retrieval of a
  837.       document, as specified in FTP by the TYPE command.  One method
  838.       indicates directory access.
  839.  
  840.  
  841.  
  842. Berners-Lee                                                    [Page 15]
  843.  
  844. RFC 1630                      URIs in WWW                      June 1994
  845.  
  846.  
  847.       The data type is specified by a suffix to the URL.  Possible
  848.       suffixes are:
  849.  
  850.        ;type = <type-code>     Use FTP type as given to perform data
  851.                                transfer.
  852.  
  853.        /                       Use FTP directory list commands to read
  854.                                directory
  855.  
  856.       The type code is in the format defined in RFC 959 except that THE
  857.       SPACE IS OMITTED FROM THE URL.
  858.  
  859.    Transfer Mode
  860.  
  861.       Stream Mode is always used.
  862.  
  863. Gopher
  864.  
  865.    The gopher URL specifies the host and optionally the port to which
  866.    the client should connect. This is followed by a slash and a single
  867.    gopher type code. This type code is used by the client to determine
  868.    how to interpret the server's reply and is is not for sending to
  869.    server.  The command string to be sent to the server immediately
  870.    follows the gopher type character.  It consists of the gopher
  871.    selector string followed by any "Gopher plus" syntax, but always
  872.    omitting the trainling CR LF pair.
  873.  
  874.    When the gopher command string contains characters (such a embedded
  875.    CR LF and HT characters) not allowed in a URL, these are encoded
  876.    using the conventional encoding.
  877.  
  878.    Note that some gopher selector strings begin with a copy of the
  879.    gopher type character, in which case that character will occur twice
  880.    consecutively.  Also note that the gopher selector string may be an
  881.    empty string since this is how gopher clients refer to the top-level
  882.    directory on a gopher server.
  883.  
  884.    If the encoded command string (with trailing CR LF stripped) would be
  885.    void then the gopher type character may be omiited and "1" (ASCII 31
  886.    hex) is assumed.
  887.  
  888.    Note that slash "/" in gopher selector strings may not correspond to
  889.    a level in a hierarchical structure.
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Berners-Lee                                                    [Page 16]
  899.  
  900. RFC 1630                      URIs in WWW                      June 1994
  901.  
  902.  
  903. Mailto
  904.  
  905.    This allows a URL to specify an RFC822 addr-spec mail address.  Note
  906.    that use of % , for example as used in forming a gatewayed mail
  907.    address, requires conversion to %25 in a URL.
  908.  
  909. News
  910.  
  911.    The news locators refer to either news group names or article message
  912.    identifiers which must conform to the rules for a Message-Id of RFC
  913.    1036 (Horton 1987).  A message identifier may be distinguished from a
  914.    news group name by the presence of the commercial at "@" character.
  915.    These rules imply that within an article, a reference to a news group
  916.    or to another article will be a valid URL (in the partial form).
  917.  
  918.    A news URL may be dereferenced using NNTP (RFC 977, Kantor 1986)
  919.    (The ARTICLE by message-id command ) or using any other protocol for
  920.    the conveyance of usenet news articles, or by reference to a body of
  921.    news articles already received.
  922.  
  923.    Note 1:
  924.  
  925.       Among URLs the "news" URLs are anomalous in that they are
  926.       location-independent. They are unsuitable as URN candidates
  927.       because the NNTP architecture relies on the expiry of articles and
  928.       therefore a small number of articles being available at any time.
  929.       When a news: URL is quoted, the assumption is that the reader will
  930.       fetch the article or group from his or her local news host.  News
  931.       host names are NOT part of news URLs.
  932.  
  933.    Note 2:
  934.  
  935.       An outstanding problem is that the message identifier is
  936.       insufficient to allow the retrieval of an expired article, as no
  937.       algorithm exists for deriving an archive site and file name.  The
  938.       addition of the date and news group set to the article's URL would
  939.       allow this if a directory existed of archive sites by news group.
  940.  
  941.       Suggested subject of study in conjunction with NNTP working group.
  942.       Further extension possible may be to allow the naming of subject
  943.       threads as addressable objects.
  944.  
  945. Telnet, rlogin, tn3270
  946.  
  947.    The use of URLs to represent interactive sessions is a convenient
  948.    extension to their uses for objects.  This allows access to
  949.    information systems which only provide an interactive service, and no
  950.    information server.  As information within the service cannot be
  951.  
  952.  
  953.  
  954. Berners-Lee                                                    [Page 17]
  955.  
  956. RFC 1630                      URIs in WWW                      June 1994
  957.  
  958.  
  959.    addressed individually or, in general, automatically retrieved, this
  960.    is a less desirable, though currently common, solution.
  961.  
  962. URN
  963.  
  964.    The "Universal Resource Name" is currently (March 1993) under
  965.    development in the IETF.  A requirements specification is in
  966.    preparation. It currently looks as though it will be a short string
  967.    suitable for encoding in URI syntax, for which case the "urn:" prefix
  968.    is reserved.  The URN shall be encoded precisely as defined in the
  969.    (future) URN standard, except in that:
  970.  
  971.       If the official description of the URN syntax includes any
  972.       constant wrapper characters, then they shall not be omitted from
  973.       the URI encoding of the URN;
  974.  
  975.       If the URN has a hierarchical nature, then the slash delimiter
  976.       shall be used in the URI encoding;
  977.  
  978.       If the URN has a hierarchical nature, the most significant part
  979.       shall be encoded on the left in the URI encoding;
  980.  
  981.       Any characters with reserved meanings in the URI syntax shall be
  982.       escape encoded
  983.  
  984.    These rules of course apply to any URI scheme.  It is of course
  985.    possible that the URN syntax will be chosen such that the URI
  986.    encoding will be a 1-1 transcription.
  987.  
  988.    An example might be a name such as
  989.  
  990.          urn:/iana/dns/ch/cern/cn/techdoc/94/1642-3
  991.  
  992.    but the reader should refer to the latest URN drafts or
  993.    specifications.
  994.  
  995. WAIS
  996.  
  997.    The current WAIS implementation public domain requires that a client
  998.    know the "type" of a object prior to retrieval. This value is
  999.    returned along with the internal object identifier in the search
  1000.    response. It has been encoded into the path part of the URL in order
  1001.    to make the URL sufficient for the retrieval of the object.
  1002.  
  1003.    Within the WAIS world, names do not of course need to be prefixed by
  1004.    "wais:" (by the partial form rules).
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Berners-Lee                                                    [Page 18]
  1011.  
  1012. RFC 1630                      URIs in WWW                      June 1994
  1013.  
  1014.  
  1015.    The wpath of a WAIS URL consists of encoded fields of the WAIS
  1016.    identifier, in the same order as inthe WAIS identifier. For each
  1017.    field, the identifier field number is the digits before the equals
  1018.    sign, and the field contents follow, encoded in the conventional
  1019.    encoding, terminated by ";".
  1020.  
  1021. file
  1022.  
  1023.    The other URI schemes (except nntp) share the property that they are
  1024.    equally valid at any geographical place.
  1025.  
  1026.    There is however a real practical requirement to be able to generate
  1027.    a URL for an object in a machine's local file system.
  1028.  
  1029.    The syntax is similar to the ftp syntax, but in this case the slash
  1030.    is used to donate boundaries between directory levels of a
  1031.    hierarchical file system is used.  The "client" software converts the
  1032.    file URL into a file name in the local file name conventions.  This
  1033.    allows local files to be treated just as network objects without any
  1034.    necessity to use a network server for access.  This may be used for
  1035.    example for defining a user's "home" document in WWW.
  1036.  
  1037.    There is clearly a danger of confusion that a link made to a local
  1038.    file should be followed by someone on a different system, with
  1039.    unexpected and possibly harmful results.  Therefore, the convention
  1040.    is that even a "file" URL is provided with a host part.  This allows
  1041.    a client on another system to know that it cannot access the file
  1042.    system, or perhaps to use some other local mecahnism to access the
  1043.    file.
  1044.  
  1045.    The special value "localhost" is used in the host field to indicate
  1046.    that the filename should really be used on whatever host one is.
  1047.    This for example allows links to be made to files which are
  1048.    distribted on many machines, or to "your unix local password file"
  1049.    subject of course to consistency across the users of the data.
  1050.  
  1051.    A void host field is equivalent to "localhost".
  1052.  
  1053. Message-Id
  1054.  
  1055.    For systems which include information transferred using mail
  1056.    protocols, there is a need to be able to make cross-references
  1057.    between different items of information, even though, by the nature of
  1058.    mail, those items are only available to a restricted set of people.
  1059.  
  1060.    Two schemes are defined.  The first, "mid:", refers to the STD 11,
  1061.    RFC 822 Message-Id of a mail message.  This Identifier is already
  1062.    used in RFC 822 in for example the References and In-Reply-to field.
  1063.  
  1064.  
  1065.  
  1066. Berners-Lee                                                    [Page 19]
  1067.  
  1068. RFC 1630                      URIs in WWW                      June 1994
  1069.  
  1070.  
  1071.    The rest of the URL after the "mid:" is the RFC822 msg-id with the
  1072.    constant <> wrapper removed, leaving an identifier whose format in
  1073.    fact happens to be the same as addr-spec format for mailboxes (though
  1074.    the semantics are different).
  1075.  
  1076.    The use of a "mid" URL implies access to a body of mail already
  1077.    received. If a message has been distributed using NNTP or other
  1078.    usenet protocols over the news system, then the "news:" form should
  1079.    be used.
  1080.  
  1081. Content-Id
  1082.  
  1083.    The second scheme, "cid:", is similar to "mid:", but makes reference
  1084.    to a body part of a MIME message by the value of its content-id
  1085.    field.  This allows, for example, a master document being the first
  1086.    part of a multipart/related MIME message to refer to component parts
  1087.    which are transferred in the same message.
  1088.  
  1089.    Note
  1090.  
  1091.       Beware however, that content identifiers are only required to be
  1092.       unique within the context of a given MIME message, and so the cid:
  1093.       URL is only meaningful with the context the same MIME message. For
  1094.       a reference outside the message, it would need to be appended to
  1095.       the message-id of the whole message.  A syntax for this has not
  1096.       been defined.
  1097.  
  1098. Schemes for Further Study
  1099.  
  1100.    X500
  1101.  
  1102.       The mapping of x500 names onto URLs is not defined here.  A
  1103.       decision is required as to whether "distinguished names" or "user
  1104.       friendly names" (ufn), or both, should be allowed.  If any
  1105.       punctuation conversions are needed from the adopted x500
  1106.       representation (such as the use of slashes between parts of a ufn)
  1107.       they must be defined.  This is a subject for study.
  1108.  
  1109.    WHOIS
  1110.  
  1111.       This prefix describes the access using the "whois++" scheme in the
  1112.       process of definition.  The host name part is the same as for
  1113.       other IP based schemes.  The path part can be either a whois
  1114.       handle for a whois object, or it can be a valid whois query
  1115.       string. This is a subject for further study.
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Berners-Lee                                                    [Page 20]
  1123.  
  1124. RFC 1630                      URIs in WWW                      June 1994
  1125.  
  1126.  
  1127.    NETWORK MANAGEMENT DATABASE
  1128.  
  1129.       This is a subject for study.
  1130.  
  1131.    NNTP
  1132.  
  1133.       This is an alternative form of reference for news articles,
  1134.       specifically to be used with NNTP servers, and particularly those
  1135.       incomplete server implementations which do not allow retrieval by
  1136.       message identifier.  In all other cases the "news" scheme should
  1137.       be used.
  1138.  
  1139.       The news server name, newsgroup name, and index number of an
  1140.       article within the newsgroup on that particular server are given.
  1141.       The NNTP protocol must be used.
  1142.  
  1143.       Note 1.
  1144.  
  1145.          This form of URL is not of global accessability, as typically
  1146.          NNTP servers only allow access from local clients.   Note that
  1147.          the article numbers within groups vary from server to server.
  1148.  
  1149.          This form or URL should not be quoted outside this local area.
  1150.          It should not be used within news articles for wider
  1151.          circulation than the one server.  This is a local identifier
  1152.          for a resource which is often available globally, and so is not
  1153.          recommended except in the case in which incomplete NNTP
  1154.          implementations on the local server force its adoption.
  1155.  
  1156. Prospero
  1157.  
  1158.    The Prospero (Neuman, 1991) directory service is used to resolve the
  1159.    URL yielding an access method for the object (which can then itself
  1160.    be represented as a URL if translated).  The host part contains a
  1161.    host name or internet address.  The port part is optional.
  1162.  
  1163.    The path part contains a host specific object name and an optional
  1164.    version number. If present, the version number is separated from the
  1165.    host specific object name by the characters "%00" (percent zero
  1166.    zero), this being an escaped string terminator (null).  External
  1167.    Prospero links are represented as URLs of the underlying access
  1168.    method and are not represented as Prospero URLs.
  1169.  
  1170. Registration of naming schemes
  1171.  
  1172.    A new naming scheme may be introduced by defining a mapping onto a
  1173.    conforming URL syntax, using a new prefix.  Experimental prefixes may
  1174.    be used by mutual agreement between parties, and must start with the
  1175.  
  1176.  
  1177.  
  1178. Berners-Lee                                                    [Page 21]
  1179.  
  1180. RFC 1630                      URIs in WWW                      June 1994
  1181.  
  1182.  
  1183.    characters "x-".  The scheme name "urn:" is reserved for the work in
  1184.    progress on a scheme for more persistent names.
  1185.  
  1186.    It is proposed that the Internet Assigned Numbers Authority (IANA)
  1187.    perform the function of registration of new schemes. Any submission
  1188.    of a new URI scheme must include a definition of an algorithm for the
  1189.    retrieval of any object within that scheme. The algorithm must take
  1190.    the URI and produce either a set of URL(s) which will lead to the
  1191.    desired object, or the object itself, in a well-defined or
  1192.    determinable format.
  1193.  
  1194.    It is recommended that those proposing a new scheme demonstrate its
  1195.    utility and operability by the provision of a gateway which will
  1196.    provide images of objects in the new scheme for clients using an
  1197.    existing protocol. If the new scheme is not a locator scheme, then
  1198.    the properties of names in the new space should be clearly defined.
  1199.    It is likewise recommended that, where a protocol allows for
  1200.    retrieval by URL, that the client software have provision for being
  1201.    configured to use specific gateway locators for indirect access
  1202.    through new naming schemes.
  1203.  
  1204. BNF of Generic URI Syntax
  1205.  
  1206.    This is a BNF-like description of the URI syntax. at the level at
  1207.    which specific schemes are not considered.
  1208.  
  1209.    A vertical line "|" indicates alternatives, and [brackets] indicate
  1210.    optional parts.  Spaces are represented by the word "space", and the
  1211.    vertical line character by "vline".  Single letters stand for single
  1212.    letters.  All words of more than one letter below are entities
  1213.    described somewhere in this description.
  1214.  
  1215.    The "generic" production gives a higher level parsing of the same
  1216.    URIs as the other productions.  The "national" and "punctuation"
  1217.    characters do not appear in any productions and therefore may not
  1218.    appear in URIs.
  1219.  
  1220.      fragmentaddress        uri [ # fragmentid ]
  1221.  
  1222.      uri                    scheme :  path [ ? search ]
  1223.  
  1224.      scheme                 ialpha
  1225.  
  1226.      path                   void |  xpalphas  [  / path ]
  1227.  
  1228.      search                 xalphas [ + search ]
  1229.  
  1230.      fragmentid             xalphas
  1231.  
  1232.  
  1233.  
  1234. Berners-Lee                                                    [Page 22]
  1235.  
  1236. RFC 1630                      URIs in WWW                      June 1994
  1237.  
  1238.  
  1239.  
  1240.      xalpha                 alpha | digit | safe | extra | escape
  1241.  
  1242.      xalphas                xalpha [ xalphas ]
  1243.  
  1244.      xpalpha                xalpha | +
  1245.  
  1246.      xpalphas               xpalpha [ xpalpha ]
  1247.  
  1248.      ialpha                 alpha [ xalphas ]
  1249.  
  1250.      alpha                  a | b | c | d | e | f | g | h | i | j | k |
  1251.                             l | m | n | o  | p | q | r | s | t | u | v |
  1252.                             w | x | y | z | A | B | C  | D | E | F | G |
  1253.                             H | I | J | K | L | M | N | O | P |  Q | R |
  1254.                             S | T | U | V | W | X | Y | Z
  1255.  
  1256.      digit                  0 |1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  1257.  
  1258.      safe                   $ | - | _ | @ | . | &
  1259.  
  1260.      extra                  ! | * | " |  ' | ( | ) | ,
  1261.  
  1262.      reserved               = | ; | / | # | ? | : | space
  1263.  
  1264.      escape                 % hex hex
  1265.  
  1266.      hex                    digit | a | b | c | d | e | f | A | B | C |
  1267.                             D | E | F
  1268.  
  1269.      national               { | } | vline | [ | ] | \ | ^ | ~
  1270.  
  1271.      punctuation            < | >
  1272.  
  1273.      void
  1274.  
  1275.       (end of URI BNF)
  1276.  
  1277. BNF for specific URL schemes
  1278.  
  1279.    This is a BNF-like description of the Uniform Resource Locator
  1280.    syntax.  A vertical line "|" indicates alternatives, and [brackets]
  1281.    indicate optional parts.  Spaces are represented by the word "space",
  1282.    and the vertical line character by "vline".  Single letters stand for
  1283.    single letters.  All words of more than one letter below are entities
  1284.    described somewhere in this description.
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Berners-Lee                                                    [Page 23]
  1291.  
  1292. RFC 1630                      URIs in WWW                      June 1994
  1293.  
  1294.  
  1295.    The current IETF URI Working Group preference is for the prefixedurl
  1296.    production. (Nov 1993. July 93: url).
  1297.  
  1298.    The "national" and "punctuation" characters do not appear in any
  1299.    productions and therefore may not appear in URLs.
  1300.  
  1301.    The "afsaddress" is left in as historical note, but is not a url
  1302.    production.
  1303.  
  1304.   prefixedurl            u r l : url
  1305.  
  1306.   url                    httpaddress | ftpaddress | newsaddress |
  1307.                          nntpaddress | prosperoaddress | telnetaddress
  1308.                          | gopheraddress | waisaddress |
  1309.                          mailtoaddress  | midaddress | cidaddress
  1310.  
  1311.   scheme                 ialpha
  1312.  
  1313.   httpaddress            h t t p :   / / hostport [  / path ] [ ?
  1314.                          search ]
  1315.  
  1316.   ftpaddress             f t p : / / login / path [  ftptype ]
  1317.  
  1318.   afsaddress             a f s : / / cellname / path
  1319.  
  1320.   newsaddress            n e w s : groupart
  1321.  
  1322.   nntpaddress            n n t p : group /  digits
  1323.  
  1324.   midaddress             m i d  :  addr-spec
  1325.  
  1326.   cidaddress             c i d : content-identifier
  1327.  
  1328.   mailtoaddress          m a i l t o : xalphas @ hostname
  1329.  
  1330.   waisaddress            waisindex | waisdoc
  1331.  
  1332.   waisindex              w a i s : / / hostport / database [ ? search
  1333.                          ]
  1334.  
  1335.   waisdoc                w a i s : / / hostport / database / wtype  /
  1336.                          wpath
  1337.  
  1338.   wpath                  digits = path ;  [ wpath ]
  1339.  
  1340.   groupart               * | group | article
  1341.  
  1342.   group                  ialpha [ . group ]
  1343.  
  1344.  
  1345.  
  1346. Berners-Lee                                                    [Page 24]
  1347.  
  1348. RFC 1630                      URIs in WWW                      June 1994
  1349.  
  1350.  
  1351.  
  1352.   article                xalphas @ host
  1353.  
  1354.   database               xalphas
  1355.  
  1356.   wtype                  xalphas
  1357.  
  1358.   prosperoaddress        prosperolink
  1359.  
  1360.   prosperolink           p r o s p e r o : / / hostport / hsoname [ %
  1361.                          0 0 version [ attributes ] ]
  1362.  
  1363.   hsoname                path
  1364.  
  1365.   version                digits
  1366.  
  1367.   attributes             attribute [ attributes ]
  1368.  
  1369.   attribute              alphanums
  1370.  
  1371.   telnetaddress          t e l n e t : / / login
  1372.  
  1373.   gopheraddress          g o p h e r : / / hostport [/ gtype  [
  1374.                          gcommand ] ]
  1375.  
  1376.   login                  [ user [ : password ] @ ] hostport
  1377.  
  1378.   hostport               host [ : port ]
  1379.  
  1380.   host                   hostname | hostnumber
  1381.  
  1382.   ftptype                A formcode | E formcode | I | L digits
  1383.  
  1384.   formcode               N | T | C
  1385.  
  1386.   cellname               hostname
  1387.  
  1388.   hostname               ialpha [  .  hostname ]
  1389.  
  1390.   hostnumber             digits . digits . digits . digits
  1391.  
  1392.   port                   digits
  1393.  
  1394.   gcommand               path
  1395.  
  1396.   path                   void |  segment  [  / path ]
  1397.  
  1398.   segment                xpalphas
  1399.  
  1400.  
  1401.  
  1402. Berners-Lee                                                    [Page 25]
  1403.  
  1404. RFC 1630                      URIs in WWW                      June 1994
  1405.  
  1406.  
  1407.  
  1408.   search                 xalphas [ + search ]
  1409.  
  1410.   user                   alphanum2 [ user ]
  1411.  
  1412.   password               alphanum2 [ password ]
  1413.  
  1414.   fragmentid             xalphas
  1415.  
  1416.   gtype                  xalpha
  1417.  
  1418.   alphanum2              alpha | digit | - | _ | . | +
  1419.  
  1420.   xalpha                 alpha | digit | safe | extra | escape
  1421.  
  1422.   xalphas                xalpha [ xalphas ]
  1423.  
  1424.   xpalpha                xalpha | +
  1425.  
  1426.   xpalphas               xpalpha [ xpalphas ]
  1427.  
  1428.   ialpha                 alpha [ xalphas ]
  1429.  
  1430.   alpha                  a | b | c | d | e | f | g | h | i | j | k |
  1431.                          l | m | n | o  | p | q | r | s | t | u | v |
  1432.                          w | x | y | z | A | B | C  | D | E | F | G |
  1433.                          H | I | J | K | L | M | N | O | P |  Q | R |
  1434.                          S | T | U | V | W | X | Y | Z
  1435.  
  1436.   digit                  0 |1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  1437.  
  1438.   safe                   $ | - | _ | @ | . | &  | + | -
  1439.  
  1440.   extra                  ! | * |  " |  ' | ( | )  | ,
  1441.  
  1442.   reserved               =  |  ;  |  /  |  #  | ? |  : | space
  1443.  
  1444.   escape                 % hex hex
  1445.  
  1446.   hex                    digit | a | b | c | d | e | f | A | B | C |
  1447.                          D | E | F
  1448.  
  1449.   national               { | } | vline | [ | ] | \ | ^ | ~
  1450.  
  1451.   punctuation            < | >
  1452.  
  1453.   digits                 digit [ digits ]
  1454.  
  1455.  
  1456.  
  1457.  
  1458. Berners-Lee                                                    [Page 26]
  1459.  
  1460. RFC 1630                      URIs in WWW                      June 1994
  1461.  
  1462.  
  1463.   alphanum               alpha | digit
  1464.  
  1465.   alphanums              alphanum [ alphanums ]
  1466.  
  1467.   void
  1468.  
  1469.    (end of URL BNF)
  1470.  
  1471. References
  1472.  
  1473.   Alberti, R., et.al., "Notes on the Internet Gopher Protocol",
  1474.      University of Minnesota, December 1991,
  1475.      <ftp://boombox.micro.umn.edu/pub/gopher/ gopher_protocol>. See also
  1476.      <gopher://gopher.micro.umn.edu/00/Information About Gopher/About
  1477.      Gopher>
  1478.  
  1479.   Berners-Lee, T., "Hypertext Transfer Protocol (HTTP)", CERN, December
  1480.      1991, as updated from time to time,
  1481.      <ftp://info.cern.ch/pub/www/doc/http-spec.txt>
  1482.  
  1483.   Crocker, D., "Standard for ARPA Internet Text Messages" STD 11, RFC
  1484.      822, UDel, August 1982.
  1485.  
  1486.   Davis, F, et  al., "WAIS Interface Protocol: Prototype Functional
  1487.      Specification", Thinking Machines Corporation, April 23, 1990.
  1488.      <ftp://quake.think.com/pub/wa is/doc/protspec.txt>
  1489.  
  1490.   International Standards Organization, Information and Documentation -
  1491.      Search and Retrieve Application Protocol Specification for open
  1492.      Systems Interconnection, ISO-10163.
  1493.  
  1494.   Horton, M., and R. Adams, "Standard for Interchange of USENET
  1495.      messages", RFC 1036, AT&T Bell Laboratories, Center for Seismic
  1496.      Studies, December 1987.
  1497.  
  1498.   Huitema, C., "Naming: strategies and techniques", Computer Networks
  1499.      and ISDN Systems 23 (1991) 107-110.
  1500.  
  1501.   Kahle, B., "Document Identifiers, or International Standard Book
  1502.      Numbers for the Electronic Age", <ftp:
  1503.      //quake.think.com/pub/wais/doc/doc-ids.txt>
  1504.  
  1505.   Kantor, B., and P. Lapsley, Kantor, B., and P. Lapsley, "Network News
  1506.      Transfer Protocol", RFC 977, UC San Diego & UC Berkeley, February
  1507.      1986.  <ftp://ds.internic.net/rfc/rfc977.txt>
  1508.  
  1509.   Kunze, J., "Requirements for URLs", Work in Progress.
  1510.  
  1511.  
  1512.  
  1513.  
  1514. Berners-Lee                                                    [Page 27]
  1515.  
  1516. RFC 1630                      URIs in WWW                      June 1994
  1517.  
  1518.  
  1519.   Lynch, C., Coalition for Networked Information: "Workshop on ID and
  1520.      Reference Structures for Networked Information", November 1991. See
  1521.      <wais://quake.think.com/wais-discussion-archives?lynch>
  1522.  
  1523.   Mockapetris, P., "Domain Names - Concepts and Facilities", STD 13, RFC
  1524.      1034, USC/Information Sciences Institute, November 1987,
  1525.      <ftp://ds.internic.net/rfc/rfc1034.txt>
  1526.  
  1527.   Neuman, B. Clifford, "Prospero: A Tool for Organizing Internet
  1528.      Resources", Electronic Networking: Research, Applications and
  1529.      Policy, Vol 1 No 2, Meckler Westport CT USA, 1992.  See also
  1530.      <ftp://prospero.isi.edu/pub/prospero/oir.ps>
  1531.  
  1532.   Postel, J., and J. Reynolds, "File Transfer Protocol (FTP)", STD 9,
  1533.      RFC 959, USC/Information Sciences Institute, October 1985.
  1534.      <ftp://ds.internic.net/rfc/rfc959.txt>
  1535.  
  1536.   Sollins, K., and L. Masinter, "Requiremnets for URNs", Work in
  1537.      Progress.
  1538.  
  1539.   Yeong, W., "Towards Networked Information Retrieval", Technical report
  1540.      91-06-25-01, June 1991, Performance Systems International, Inc.
  1541.      <ftp://uu.psi.com/wp/nir.txt>
  1542.  
  1543.   Yeong, W., "Representing Public Archives in the Directory", Work in
  1544.      Progress, November 1991, now expired.
  1545.  
  1546. Security Considerations
  1547.  
  1548.    Security issues are not discussed in this memo.
  1549.  
  1550. Author's Address
  1551.  
  1552.    Tim Berners-Lee
  1553.    World-Wide Web project
  1554.    CERN
  1555.    1211 Geneva 23,
  1556.    Switzerland
  1557.  
  1558.    Phone: +41 (22)767 3755
  1559.    Fax:   +41 (22)767 7155
  1560.    EMail: timbl@info.cern.ch
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570. Berners-Lee                                                    [Page 28]
  1571.  
  1572.