rfc4266.txt - gopher-protocol - Gopher Protocol Extension Project
 (HTM) git clone git://bitreich.org/gopher-protocol git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-protocol
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
       rfc4266.txt (12083B)
       ---
            1 
            2 
            3 
            4 
            5 
            6 
            7 Network Working Group                                         P. Hoffman
            8 Request for Comments: 4266                                VPN Consortium
            9 Obsoletes: 1738                                            November 2005
           10 Category: Standards Track
           11 
           12 
           13                          The gopher URI Scheme
           14 
           15 Status of This Memo
           16 
           17    This document specifies an Internet standards track protocol for the
           18    Internet community, and requests discussion and suggestions for
           19    improvements.  Please refer to the current edition of the "Internet
           20    Official Protocol Standards" (STD 1) for the standardization state
           21    and status of this protocol.  Distribution of this memo is unlimited.
           22 
           23 Copyright Notice
           24 
           25    Copyright (C) The Internet Society (2005).
           26 
           27 Abstract
           28 
           29    This document specifies the gopher Uniform Resource Identifier (URI)
           30    scheme that was originally specified in RFC 1738.  The purpose of
           31    this document is to allow RFC 1738 to be made obsolete while keeping
           32    the information about the scheme on standards track.
           33 
           34 1.  Introduction
           35 
           36    URIs were previously defined in RFC 2396 [RFC2396], which was updated
           37    by RFC 3986 [RFC3986].  Those documents also specify how to define
           38    schemes for URIs.
           39 
           40    The first definition for many URI schemes appeared in RFC 1738
           41    [RFC1738].  Because that document has been made obsolete, this
           42    document copies the gopher URI scheme from it to allow that material
           43    to remain on standards track.
           44 
           45 2.  Scheme Definition
           46 
           47    The gopher URL scheme is used to designate Internet resources
           48    accessible using the Gopher protocol.
           49 
           50    The base Gopher protocol is described in RFC 1436 [RFC1436] and
           51    supports items and collections of items (directories).  The Gopher+
           52    protocol is a set of upward-compatible extensions to the base Gopher
           53    protocol and is described in [Gopher+].  Gopher+ supports associating
           54 
           55 
           56 
           57 
           58 Hoffman                     Standards Track                     [Page 1]
           59 
           60 RFC 4266                 The gopher URI Scheme             November 2005
           61 
           62 
           63    arbitrary sets of attributes and alternate data representations with
           64    Gopher items.  Gopher URLs accommodate both Gopher and Gopher+ items
           65    and item attributes.
           66 
           67    Historical note: The Gopher protocol was widely implemented in the
           68    early 1990s, but few Gopher servers are in use today.
           69 
           70 2.1.  Gopher URL Syntax
           71 
           72    A Gopher URL takes the form:
           73 
           74       gopher://<host>:<port>/<gopher-path>
           75 
           76    where <gopher-path> is one of:
           77 
           78       <gophertype><selector>
           79       <gophertype><selector>%09<search>
           80       <gophertype><selector>%09<search>%09<gopher+_string>
           81 
           82    If :<port> is omitted, the port defaults to 70. <gophertype> is a
           83    single-character field to denote the Gopher type of the resource to
           84    which the URL refers.  The entire <gopher-path> may also be empty, in
           85    which case the delimiting "/" is also optional and the <gophertype>
           86    defaults to "1".
           87 
           88    <selector> is the Gopher selector string.  In the Gopher protocol,
           89    Gopher selector strings are a sequence of octets that may contain any
           90    octets except 09 hexadecimal (US-ASCII HT or tab), 0A hexadecimal
           91    (US-ASCII character LF), and 0D (US-ASCII character CR).
           92 
           93    Gopher clients specify which item to retrieve by sending the Gopher
           94    selector string to a Gopher server.
           95 
           96    Within the <gopher-path>, no characters are reserved.
           97 
           98    Note that some Gopher <selector> strings begin with a copy of the
           99    <gophertype> character, in which case that character will occur twice
          100    consecutively.  The Gopher selector string may be an empty string;
          101    this is how Gopher clients refer to the top-level directory on a
          102    Gopher server.
          103 
          104 2.2.  Specifying URLs for Gopher Search Engines
          105 
          106    If the URL refers to a search to be submitted to a Gopher search
          107    engine, the selector is followed by an encoded tab (%09) and the
          108    search string.  To submit a search to a Gopher search engine, the
          109    Gopher client sends the <selector> string (after decoding), a tab,
          110    and the search string to the Gopher server.
          111 
          112 
          113 
          114 Hoffman                     Standards Track                     [Page 2]
          115 
          116 RFC 4266                 The gopher URI Scheme             November 2005
          117 
          118 
          119 2.3.  URL Syntax for Gopher+ Items
          120 
          121    Historical note: Gopher+ was uncommon even when Gopher was popular.
          122 
          123    URLs for Gopher+ items have a second encoded tab (%09) and a Gopher+
          124    string.  Note that in this case, the %09<search> string must be
          125    supplied, although the <search> element may be the empty string.
          126 
          127    The <gopher+_string> is used to represent information required for
          128    retrieval of the Gopher+ item.  Gopher+ items may have alternate
          129    views and arbitrary sets of attributes, and they may have electronic
          130    forms associated with them.
          131 
          132    To retrieve the data associated with a Gopher+ URL, a client will
          133    connect to the server and send the Gopher selector, followed by a tab
          134    and the search string (which may be empty), followed by a tab and the
          135    Gopher+ commands.
          136 
          137 2.4.  Default Gopher+ Data Representation
          138 
          139    When a Gopher server returns a directory listing to a client, the
          140    Gopher+ items are tagged with either a "+" (denoting Gopher+ items)
          141    or a "?" (denoting Gopher+ items that have a +ASK form associated
          142    with them).  A Gopher URL with a Gopher+ string consisting of only a
          143    "+" refers to the default view (data representation) of the item, and
          144    a Gopher+ string containing only a "?" refers to an item with a
          145    Gopher electronic form associated with it.
          146 
          147 2.5.  Gopher+ Items with Electronic Forms
          148 
          149    Gopher+ items that have a +ASK associated with them (i.e., Gopher+
          150    items tagged with a "?") require the client to fetch the item's +ASK
          151    attribute to get the form definition, and then ask the user to fill
          152    out the form and return the user's responses along with the selector
          153    string to retrieve the item.  Gopher+ clients know how to do this but
          154    depend on the "?" tag in the Gopher+ item description to know when to
          155    handle this case.  The "?" is used in the Gopher+ string to be
          156    consistent with Gopher+ protocol's use of this symbol.
          157 
          158 2.6.  Gopher+ Item Attribute Collections
          159 
          160    To refer to the Gopher+ attributes of an item, the Gopher URL's
          161    Gopher+ string consists of "!" or "$". "!" refers to all of a Gopher+
          162    item's attributes. "$" refers to all the item attributes for all
          163    items in a Gopher directory.
          164 
          165 
          166 
          167 
          168 
          169 
          170 Hoffman                     Standards Track                     [Page 3]
          171 
          172 RFC 4266                 The gopher URI Scheme             November 2005
          173 
          174 
          175 2.7.  Referring to Specific Gopher+ Attributes
          176 
          177    To refer to specific attributes, the URL's gopher+_string is
          178    "!<attribute_name>" or "$<attribute_name>".  For example, to refer to
          179    the attribute containing the abstract of an item, the gopher+_string
          180    would be "!+ABSTRACT".
          181 
          182    To refer to several attributes, the gopher+_string consists of the
          183    attribute names separated by coded spaces.  For example,
          184    "!+ABSTRACT% 20+SMELL" refers to the +ABSTRACT and +SMELL attributes
          185    of an item.
          186 
          187 2.8.  URL Syntax for Gopher+ Alternate Views
          188 
          189    Gopher+ allows for optional alternate data representations (alternate
          190    views) of items.  To retrieve a Gopher+ alternate view, a Gopher+
          191    client sends the appropriate view and language identifier (found in
          192    the item's +VIEW attribute).  To refer to a specific Gopher+
          193    alternate view, the URL's Gopher+ string would be in the form:
          194 
          195       +<view_name>%20<language_name>
          196 
          197    For example, a Gopher+ string of "+application/postscript%20Es_ES"
          198    refers to the Spanish language postscript alternate view of a Gopher+
          199    item.
          200 
          201 2.9.  URL Syntax for Gopher+ Electronic Forms
          202 
          203    The gopher+_string for a URL that refers to an item referenced by a
          204    Gopher+ electronic form (an ASK block) filled out with specific
          205    values is a coded version of what the client sends to the server.
          206    The gopher+_string is of the form:
          207 
          208       +%091%0D%0A+-1%0D%0A<ask_item1_value>%0D%0A
          209       <ask_item2_value>%0D%0A.%0D%0A
          210 
          211    To retrieve this item, the Gopher client sends the following text to
          212    the Gopher server.
          213 
          214       <a_gopher_selector><tab>+<tab>1<cr><lf>
          215       +-1<cr><lf>
          216       <ask_item1_value><cr><lf>
          217       <ask_item2_value><cr><lf>
          218       .<cr><lf>
          219 
          220 
          221 
          222 
          223 
          224 
          225 
          226 Hoffman                     Standards Track                     [Page 4]
          227 
          228 RFC 4266                 The gopher URI Scheme             November 2005
          229 
          230 
          231 3.  Security Considerations
          232 
          233    There are many security considerations for URI schemes discussed in
          234    [RFC3986].  The Gopher protocol uses passwords in the clear for
          235    authentication, and offers no privacy, both of which are considered
          236    extremely unsafe in current practice.
          237 
          238 4.  Informative References
          239 
          240    [Gopher+]  Anklesaria, F., et al., "Gopher+: Upward compatible
          241               enhancements to the Internet Gopher protocol", University
          242               of Minnesota, July 1993, <ftp://boombox.micro.umn.edu/pub/
          243               gopher/gopher_protocol/Gopher+/Gopher+.txt>
          244 
          245    [RFC1738]  Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform
          246               Resource Locators (URL)", RFC 1738, December 1994.
          247 
          248    [RFC2396]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
          249               Resource Identifiers (URI): Generic Syntax", RFC 2396,
          250               August 1998.
          251 
          252    [RFC3986]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
          253               Resource Identifier (URI): Generic Syntax", STD 66,
          254               RFC 3986, January 2005.
          255 
          256    [RFC1436]  Anklesaria, F., McCahill, M., Lindner, P., Johnson, D.,
          257               Torrey, D., and B. Albert, "The Internet Gopher Protocol
          258               (a distributed document search and retrieval protocol)",
          259               RFC 1436, March 1993.
          260 
          261 Author's Address
          262 
          263    Paul Hoffman
          264    VPN Consortium
          265    127 Segre Place
          266    Santa Cruz, CA  95060
          267    US
          268 
          269    EMail: paul.hoffman@vpnc.org
          270 
          271 
          272 
          273 
          274 
          275 
          276 
          277 
          278 
          279 
          280 
          281 
          282 Hoffman                     Standards Track                     [Page 5]
          283 
          284 RFC 4266                 The gopher URI Scheme             November 2005
          285 
          286 
          287 Full Copyright Statement
          288 
          289    Copyright (C) The Internet Society (2005).
          290 
          291    This document is subject to the rights, licenses and restrictions
          292    contained in BCP 78, and except as set forth therein, the authors
          293    retain all their rights.
          294 
          295    This document and the information contained herein are provided on an
          296    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
          297    OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
          298    ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
          299    INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
          300    INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
          301    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
          302 
          303 Intellectual Property
          304 
          305    The IETF takes no position regarding the validity or scope of any
          306    Intellectual Property Rights or other rights that might be claimed to
          307    pertain to the implementation or use of the technology described in
          308    this document or the extent to which any license under such rights
          309    might or might not be available; nor does it represent that it has
          310    made any independent effort to identify any such rights.  Information
          311    on the procedures with respect to rights in RFC documents can be
          312    found in BCP 78 and BCP 79.
          313 
          314    Copies of IPR disclosures made to the IETF Secretariat and any
          315    assurances of licenses to be made available, or the result of an
          316    attempt made to obtain a general license or permission for the use of
          317    such proprietary rights by implementers or users of this
          318    specification can be obtained from the IETF on-line IPR repository at
          319    http://www.ietf.org/ipr.
          320 
          321    The IETF invites any interested party to bring to its attention any
          322    copyrights, patents or patent applications, or other proprietary
          323    rights that may cover technology that may be required to implement
          324    this standard.  Please address the information to the IETF at ietf-
          325    ipr@ietf.org.
          326 
          327 Acknowledgement
          328 
          329    Funding for the RFC Editor function is currently provided by the
          330    Internet Society.
          331 
          332 
          333 
          334 
          335 
          336 
          337 
          338 Hoffman                     Standards Track                     [Page 6]
          339