Network Working Group F. Anklesaria
Request for Comments: 1436 M. McCahill
P. Lindner
D. Johnson
D. Torrey
B. Alberti
University of Minnesota
March 1993
The Internet Gopher Protocol
(a distributed document search and retrieval protocol)
Status of this Memo
This memo provides information for the Internet community. It does
not specify an Internet standard. Distribution of this memo is
unlimited.
Abstract
The Internet Gopher protocol is designed for distributed document
search and retrieval. This document describes the protocol, lists
some of the implementations currently available, and has an overview
of how to implement new client and server applications. This
document is adapted from the basic Internet Gopher protocol document
first issued by the Microcomputer Center at the University of
Minnesota in 1991.
Introduction
gopher n. 1. Any of various short tailed, burrowing mammals of the
family Geomyidae, of North America. 2. (Amer. colloq.) Native or
inhabitant of Minnesota: the Gopher State. 3. (Amer. colloq.) One
who runs errands, does odd-jobs, fetches or delivers documents for
office staff. 4. (computer tech.) software following a simple
protocol for burrowing through a TCP/IP internet.
The Internet Gopher protocol and software follow a client-server
model. This protocol assumes a reliable data stream; TCP is assumed.
Gopher servers should listen on port 70 (port 70 is assigned to
Internet Gopher by IANA). Documents reside on many autonomous
servers on the Internet. Users run client software on their desktop
systems, connecting to a server and sending the server a selector (a
line of text, which may be empty) via a TCP connection at a well-
known port. The server responds with a block of text terminated by a
period on a line by itself and closes the connection. No state is
retained by the server.
RFC 1436 Gopher March 1993
While documents (and services) reside on many servers, Gopher client
software presents users with a hierarchy of items and directories
much like a file system. The Gopher interface is designed to
resemble a file system since a file system is a good model for
organizing documents and services; the user sees what amounts to one
big networked information system containing primarily document items,
directory items, and search items (the latter allowing searches for
documents across subsets of the information base).
Servers return either directory lists or documents. Each item in a
directory is identified by a type (the kind of object the item is),
user-visible name (used to browse and select from listings), an
opaque selector string (typically containing a pathname used by the
destination host to locate the desired object), a host name (which
host to contact to obtain this item), and an IP port number (the port
at which the server process listens for connections). The user only
sees the user-visible name. The client software can locate and
retrieve any item by the trio of selector, hostname, and port.
To use a search item, the client submits a query to a special kind of
Gopher server: a search server. In this case, the client sends the
selector string (if any) and the list of words to be matched. The
response yields "virtual directory listings" that contain items
matching the search criteria.
Gopher servers and clients exist for all popular platforms. Because
the protocol is so sparse and simple, writing servers or clients is
quick and straightforward.
1. Introduction
The Internet Gopher protocol is designed primarily to act as a
distributed document delivery system. While documents (and services)
reside on many servers, Gopher client software presents users with a
hierarchy of items and directories much like a file system. In fact,
the Gopher interface is designed to resemble a file system since a
file system is a good model for locating documents and services. Why
model a campus-wide information system after a file system? Several
=1= |