The Web Server Assignment

Your mission is to write a web server. I will test this by pointing Chrome/Edge/Safari 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.

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 100 points. There is a maximum of 100 points on this assignment.



20 - Can do http/1.0
     Must send correct type for *.jpg, *.gif, *.html and *.txt
30 - Can send binary files. https://cplusplus.com/reference/istream/istream/read/
10 - All reads/writes are error checked!
10 - Logs all accesses
20 - Uses try/catch for error checking
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 .nmu.edu
10 - Rejects all connections that identify themselves as from I.E.
-10 - Each work day after Thr Mar 25th.