CSE 80 -- Lecture 15 -- Feb 25

I gave an example, using the netd program (in ../public/bin.sun4_551/), of a simple network daemon to support finger requests. The myfingerd code is:
# myfingerd -- assumed to be run under netd, e.g., netd -p 1079 -- myfingerd

read username
username=`echo "$username" | sed 's/^M//'`
finger "$username" | sed 's/$/^M/'
where the caret-M notation in the text above denotes the control-M (carriage return) character; in the shell script, a real control-M is embedded there.

I also talked about HTTP and MIME data, and told you to telnet to port 80 (default HTTP port) of some web servers and try to request a document. Using HTTP 0.9, the request would be done as follows:

$ telnet www.ucsd.edu 80
requested document (/) will be sent by the server here
Using HTTP 1.0, the request would look like:
$ telnet www.ucsd.edu 80
GET / HTTP/1.0
Host: work.ucsd.edu:5555
Proxy-Connection: Keep-Alive
User-Agent: Mozilla/3.0Gold (X11; I; Linux 2.0.27 i586)
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

requested document (/) will be sent by the server here
Note that the request ends with a blank line.
[ CSE 80 | ACS home | CSE home | CSE calendar | bsy's home page ]
picture of bsy

bsy@cse.ucsd.edu, last updated Tue Mar 18 15:49:40 PST 1997.

email bsy