Gopher+ Upward Compatible Enhancements to the Internet Gopher Protocol Anklesaria, Lindner, McCahill, Torry, Johnson, Alberti, July 1993
Motivation: Provide easy anonymous access to information
Port: 70
Stateless
Client: open connection
Server: accept connection
Client: <selector><CRLF>
Server: <Stuff1><CRLF>
<Stuff2><CRLF>
<StuffN><CRLF>
.<CRLF>
close connection
Tells server to send list of what it has
Server responds with DirEntity (item list)
DirEntity Format
DirEntity Example
Telnet: open connection on saturn port 70
Server: accept connection
Telnet: <CRLF>
Server:
0About this gopher server 0/About this gopher Saturn.SDSU.Edu 70 1Fall1994 Course Schedule viewcourse CS gopher.sdsu.edu 91 1Undergraduate CS Major 1/major Saturn.SDSU.Edu 70 1CS Master's Exam Info 1/mastersExam Saturn.SDSU.Edu 70 1CS 596 OOP Fall 94 1/CS596 OOP Saturn.SDSU.Edu 70 1CS 660 Comb Alg Fall 94 1/CS660 Saturn.SDSU.Edu 70 .
0 Item is a file
1 Item is a directory
2 Item is a CSO phone-book server
3 Error
4 Item is a BinHexed Macintosh file.
5 Item is DOS binary archive of some sort.
Client must read until the TCP connection closes.
6 Item is a UNIX uuencoded file.
7 Item is an Index-Search server.
8 Item points to a text-based telnet session.
9 Item is a binary file!
Client must read until the TCP connection closes.
+ Item is a redundant server
T Item points to a text-based tn3270 session.
g Item is a GIF format graphics file.
I Item is some kind of image file.
Client decides how to display.
Characters '0' through 'Z' are reserved.
Telnet: open connection on saturn port 70
Server: accept connection
Telnet: 1/major<CRLF>
Server:
0Undergraduate Advisors 0/major/advising Saturn.SDSU.Edu 70 0Required courses for a CS major 0/major/required Saturn.SDSU.Edu 70 0Elective courses for a CS major 0/major/electives Saturn.SDSU.Edu 70 0CS499 as an elective 0/major/499 Saturn.SDSU.Edu 70 1Articulation agreements 1/major/artic Saturn.SDSU.Edu 70 .
Telnet: open connection on gopher.sdsu.edu port 91
Server: accept connection
Telnet: <CRLF>
Server:
<Type><DisplayString> <Selector> <Host>
<Type><DisplayString> <Selector> <Host> 0About this Gopher about gopher.sdsu.edu 91 0Help help gopher.sdsu.edu 91 7Class title search class gopher.sdsu.edu 91 7Instructor search instr gopher.sdsu.edu 91 7Sound alike instructor search xinstr gopher.sdsu.edu 91 7Schedule number search sched gopher.sdsu.edu 91 7Search entire schedule all gopher.sdsu.edu 91 7Search open classes by title avail gopher.sdsu.edu 91 .
Extend Gopher protocol to support:
Gopher+ DirEntity Format
DirEntity Example
Client: open connection
Server: accept connection
Client: <selector><TAB>+<CRLF>
Possible Server Responses
Telnet: open connection on saturn port 70
Server: accept connection
Telnet: 1/major<TAB>+<CRLF>
Server:
+-10Undergraduate Advisors 0/major/advising Saturn.SDSU.Edu 70 + 0Required courses for a CS major 0/major/required Saturn.SDSU.Edu 70 + 0Elective courses for a CS major 0/major/electives Saturn.SDSU.Edu 70 + 0CS499 as an elective 0/major/499 Saturn.SDSU.Edu 70 + 1Articulation agreements 1/major/artic Saturn.SDSU.Edu 70 + .
Client: open connection
Server: accept connection
Client: <selector><TAB>!<CRLF>
Server: returns the attribute information for the item indicated in the selector
Attribute Format
Required Attributes
Content-Type Text/plain application/postscript
image/gif etc
Content-Type En_US De_DE,
Telnet: open connection on saturn port 70
Server: accept connection
Telnet: 1/major<TAB>!<CRLF>
Server:
+-1
+INFO: 1Undergraduate CS Major 1/major Saturn.SDSU.Edu 70 +
+ADMIN:
Admin: Computer Science <whitney@saturn.sdsu.edu>
Mod-Date: Fri Sep 16 09:44:18 1994 <19940916094418>
Access: read
+VIEWS:
application/gopher-menu En_US: <.5k>
application/gopher+-menu En_US: <.5k>
+PROTOCOLS:
gopher
gopher+
gopher+/meta
.
Client: open connection
Server: accept connection
Client: <selector><TAB>$<CRLF>
Client: open connection
Server: accept connection
Client: <selector><TAB>$+VIEWS+ABSTRACT<CRLF>
DirEntity format for query
DirEntity Example
ASK attribute contains questions for client to show user
+ASK:
Note: Electronic Roster Registration
Note:
Ask: Last Name:
Note:
Ask: First Name:
Note:
Ask: Fac/Staff ID# (SS#):
Note:
Ask: Phone Number:
Note:
Ask: E-mail Address:
Note:
Ask: Department(s):
Note:
Choose: Type: Faculty Staff
AskL
AskF"
AskP
Select
Choose
User selects item in Client that has ? extension
Client gets ask attribute for item from server
Server disconnects
Client displays questions to user, gets answers
Client relays answers to server!!!!
<selector><TAB>
+[representation]
[<TAB><dataFlag>]<CRLF>
[dataBlock]
OCTET = $00 -> $ff
UNASCII = OCTET - [TAB, CRLF, NUL ]
representation = 'Text' | 'List' | 'Postscript' | 'MacWriteII |
'RTF | {UNASCII}
dataFlag = 0 means no data block
= 1 means has data block
Success = '+' | '-'
Transfer ::= DigitSeq | '-1' | '-2'
DataHead ::= Success Transfer CRLF
DataBlock ::= DataHead {OCTET}