It is good practice to use the content-type header to determine the type of content, and to determine the extension to use for storing the content as a file.