[cs631apue] Content Type header Media Types

jphillip jphillip at stevens.edu
Sat Nov 17 17:45:58 EST 2012


My understanding after reading the RFC is that the Entity-Body is the 
name given to the data part of the response message that is the returned 
resource.  The RFC says we should include a Content-Type when we return 
an Entity-Body.  So we should always be including an entity header and a 
Content-Type field when we successfully find and return the requested 
resource.  Is that basically correct?

What should be our approach for determining the media type that is 
returned in the Content-Type header field?  Should our server presume to 
know something about the files based on the file extensions or other 
file attributes?  It looks like there are about a hundred different 
media types (see http://en.wikipedia.org/wiki/Internet_media_type) so do 
we have to code for each one?

Thanks,
Justin



More information about the cs631apue mailing list