RFC 4266
The gopher URI Scheme
RFC 4266: The gopher URI Scheme πΏοΈβ¨
Okay bestie, here's the tea π« This is RFC 4266, called "The gopher URI Scheme" π. Paul Hoffman from the VPN Consortium wrote it π and it came out in November 2005 πΈ. It's on the Standards Track π and it obsoletes RFC 1738 π, which is the big reason it exists at all.
Status of This Memo β¨
This document is an Internet standards track protocol for the Internet community, and it's basically asking everyone to talk about it and suggest improvements π¬. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1) π. Distribution of this memo is unlimited π¦.
Copyright Notice β¨
Copyright (C) The Internet Society (2005) π.
Abstract π
Okay so this document specifies the gopher Uniform Resource Identifier (URI) scheme, which was first specified in RFC 1738 πΏοΈ. The whole point is to let RFC 1738 be made obsolete while the gopher info stays on the standards track. Main character energy π.
1. Introduction πΈ
URIs were first defined in RFC 2396 [RFC2396], and then RFC 3986 [RFC3986] updated that. Both of those documents also explain how to define schemes for URIs π«Ά.
The first definition for a lot of URI schemes showed up in RFC 1738 [RFC1738]. Since that document is now obsolete, this one copies the gopher URI scheme over from it so the material can stay on standards track π.
2. Scheme Definition π§
The gopher URL scheme is used to point at Internet resources you can reach with the Gopher protocol πΏοΈβ¨.
The base Gopher protocol is described in RFC 1436 [RFC1436]. It supports items and collections of items (directories) π. Gopher+ is a set of upward-compatible extensions to the base Gopher protocol and is described in [Gopher+] π. It lets you attach arbitrary sets of attributes and alternate data representations to Gopher items, and Gopher URLs cover both Gopher and Gopher+ items and their attributes π .
Historical note: The Gopher protocol was everywhere in the early 1990s, but hardly any Gopher servers are still running today π₯².
2.1. Gopher URL Syntax π¦
A Gopher URL takes this 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>
If :<port> is left out, the port defaults to 70 π₯. <gophertype> is a single-character field that says what Gopher type the URL's resource is π§©. The whole <gopher-path> can also be empty. In that case the delimiting "/" is optional too, and <gophertype> defaults to "1" β¨.
<selector> is the Gopher selector string. In the Gopher protocol it's a sequence of octets that can hold any octets except 09 hexadecimal (US-ASCII HT or tab), 0A hexadecimal (US-ASCII character LF), and 0D (US-ASCII character CR) π.
Gopher clients pick which item they want by sending the Gopher selector string to a Gopher server π¬.
Inside the <gopher-path>, no characters are reserved π.
Heads up, some Gopher <selector> strings start with a copy of the <gophertype> character. When that happens, the character shows up twice in a row π―. The Gopher selector string can also be an empty string, and that's how Gopher clients refer to the top-level directory on a Gopher server π .
2.2. Specifying URLs for Gopher Search Engines π
If the URL is pointing at a search that gets submitted to a Gopher search engine, the selector is followed by an encoded tab (%09) and then the search string π«§. To submit that search, the Gopher client sends the <selector> string (after decoding it), a tab, and the search string to the Gopher server π.
2.3. URL Syntax for Gopher+ Items π
Historical note: Gopher+ was uncommon even back when regular Gopher was popular π.
URLs for Gopher+ items get a second encoded tab (%09) and a Gopher+ string. In this case the %09<search> part must be included, even though the <search> element is allowed to be the empty string π.
The <gopher+_string> carries the info needed to retrieve the Gopher+ item. Gopher+ items can have alternate views and arbitrary sets of attributes, and they can also have electronic forms attached π§Ύ.
To grab the data behind a Gopher+ URL, a client connects to the server and sends the Gopher selector, then a tab and the search string (which can be empty), then another tab and the Gopher+ commands π¬.
2.4. Default Gopher+ Data Representation π¨
When a Gopher server sends a directory listing to a client, its Gopher+ items get tagged with either a "+" (meaning Gopher+ items) or a "?" (meaning Gopher+ items that have a +ASK form attached) π·οΈ. A Gopher URL whose Gopher+ string is only a "+" points at the default view (data representation) of the item. A Gopher+ string that's only a "?" points at an item with a Gopher electronic form attached π .
2.5. Gopher+ Items with Electronic Forms π
Gopher+ items with a +ASK attached (the ones tagged with "?") need the client to fetch the item's +ASK attribute to get the form definition π. Then the client asks the user to fill out the form, and sends the user's answers back along with the selector string to get the item π. Gopher+ clients already know how to do all this, but they rely on the "?" tag in the item description to know when to handle it π§ . The "?" shows up in the Gopher+ string because it matches how the Gopher+ protocol uses that symbol π.
2.6. Gopher+ Item Attribute Collections ποΈ
To refer to a Gopher+ item's attributes, the Gopher URL's Gopher+ string is "!" or "$". "!" means all of one item's Gopher+ attributes π―. "$" means all the item attributes for every item in a Gopher directory π.
2.7. Referring to Specific Gopher+ Attributes π
To point at specific attributes, the URL's gopher+_string is "!<attribute_name>" or "$<attribute_name>" π. For example, to get the attribute holding an item's abstract, the gopher+_string would be "!+ABSTRACT" π.
To refer to several attributes at once, the gopher+_string is the attribute names separated by coded spaces. For example, "!+ABSTRACT% 20+SMELL" refers to the +ABSTRACT and +SMELL attributes of an item πβ¨.
2.8. URL Syntax for Gopher+ Alternate Views π
Gopher+ lets items have optional alternate data representations (alternate views) πΌοΈ. To get one, a Gopher+ client sends the right view and language identifier, which you can find in the item's +VIEW attribute π. To point at a specific alternate view, the URL's Gopher+ string looks like this:
+<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 πͺπΈπ.
2.9. URL Syntax for Gopher+ Electronic Forms π
The gopher+_string for a URL pointing at an item referenced by a Gopher+ electronic form (an ASK block) that's been filled out with specific values is a coded version of what the client sends to the server π«§. The gopher+_string looks like this:
+%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 the following text to the Gopher server:
<a_gopher_selector><tab>+<tab>1<cr><lf>
+-1<cr><lf>
<ask_item1_value><cr><lf>
<ask_item2_value><cr><lf>
.<cr><lf>
3. Security Considerations π
Okay, security is serious, so listen up π¨. There are lots of security considerations for URI schemes, and they're discussed in [RFC3986] π. The Gopher protocol uses passwords in the clear for authentication and offers no privacy, and both of those are considered extremely unsafe in current practice ππ.
4. Informative References π
[Gopher+] Anklesaria, F., et al., "Gopher+: Upward compatible enhancements to the Internet Gopher protocol", University of Minnesota, July 1993, <ftp://boombox.micro.umn.edu/pub/gopher/gopher_protocol/Gopher+/Gopher+.txt> πΏοΈ
[RFC1738] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, December 1994. πΈ
[RFC2396] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998. π·
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005. π
[RFC1436] Anklesaria, F., McCahill, M., Lindner, P., Johnson, D., Torrey, D., and B. Albert, "The Internet Gopher Protocol (a distributed document search and retrieval protocol)", RFC 1436, March 1993. π§
Author's Address π
Paul Hoffman
VPN Consortium
127 Segre Place
Santa Cruz, CA 95060
US
EMail: paul.hoffman@vpnc.org
Full Copyright Statement π
Copyright (C) The Internet Society (2005).
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property π¦
The IETF takes no position on the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document, or on whether any license under those rights might or might not be available. It also doesn't claim to have made any independent effort to identify such rights π«Ά. Info on the procedures for rights in RFC documents can be found in BCP 78 and BCP 79 π.
Copies of IPR disclosures made to the IETF Secretariat, any assurances of licenses to be made available, or the result of an attempt to get a general license or permission for implementers or users to use such proprietary rights can be found in the IETF on-line IPR repository at http://www.ietf.org/ipr π.
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology needed to implement this standard. Send that info to the IETF at ietf-ipr@ietf.org π¨.
Acknowledgement π
Funding for the RFC Editor function is currently provided by the Internet Society π.
π¦ where this page comes from
- ietf: rfc4266 2005-11
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms