The Web Server Assignment

Your mission is to write a web server. I will test this by pointing Chrome/IE at your server, and expecting everything to work. You can find a sample of the combined logfile format, and a server that shows you what clients send as requests.

You might want to do a string search-and-replace as shown at http://stackoverflow.com/questions/5878775/how-to-find-and-replace-string.

I do not expect anyone to get all these items. This is just a laundry list. Get the ones that interest you!

This assignment is out of 90 points. There is a maximum of 100 points on this assignment.


10 - Can do http/0.9
20 - Can do http/1.0
     Must send correct type for *.jpg, *.gif, *.html and *.txt
30 - Can send binary files.
10 - Logs all accesses
10 - Uses the combined logfile format 
     I WILL BE PICKY ABOUT FORMAT!
     Date, hostname and referrer can be faked.
10 - Uses the actual file size 
     Could be in the metadata like this  "Content-Length:  1234"
     Could be in the log file.
     Either one works.
10 - Logs include the correct time of day 
     see time() and ctime()
     see time() and localtime() and strftime()
     see 'man 2 time' for the man page of the time functions above
     see http://linux.die.net/man/3/strftime
10 - These logs even have the correct referrer
10 - These logs have the correct name or IP number from the requester
     See http://www.qnx.com/developers/docs/6.3.2/neutrino/lib_ref/g/gethostbyaddr.html
10 - Rejects all connections from euclid.nmu.edu
10 - Rejects all connections that identify themselves as from I.E.
-10 - Each work day after Web Mar 11th.