I am implementing a HTTP/1.0 server that processes GET
or HEAD
request.
I\'ve finished Date
, Last-Modified
, and
It depends how sophisticated you want to be.
If the files in question are all properly named and there are only several types to handle, having a switch based file suffix is sufficient. Going to the extreme case, making the right decision no matter what the file is would probably require either duplicating the functionality of Unix file
command or running it on file in question (and then translating the output to the proper Content-Type
).