I am implementing a HTTP/1.0 server that processes GET or HEAD request.
GET
HEAD
I\'ve finished Date, Last-Modified, and
Date
Last-Modified
You could either look at the file extension (which is what most web servers do -- see e.g. the /etc/mime.types file; or you could use libmagic to automatically determine the content type by looking at the first few bytes of the file.
/etc/mime.types
libmagic