You are previewing HTTP: The Definitive Guide.

HTTP: The Definitive Guide

Cover of HTTP: The Definitive Guide by David Gourley... Published by O'Reilly Media, Inc.

Media Type and Charset

The Content-Type header field describes the MIME type of the entity body.[7] The MIME type is a standardized name that describes the underlying type of media carried as cargo (HTML file, Microsoft Word document, MPEG video, etc.). Client applications use the MIME type to properly decipher and process the content.

The Content-Type values are standardized MIME types, registered with the Internet Assigned Numbers Authority (IANA). MIME types consist of a primary media type (e.g., text, image, audio), followed by a slash, followed by a subtype that further specifies the media type. Table 15-1 lists a few common MIME types for the Content-Type header. More MIME types are listed in Appendix D.

Table 15-1. Common media types

Media type



Entity body is an HTML document


Entity body is a document in plain text


Entity body is an image of type GIF


Entity body is an image of type JPEG


Entity body contains WAV sound data


Entity body is a three-dimensional VRML model


Entity body is a Microsoft PowerPoint presentation


Entity body has multiple parts, each containing a different range (in bytes) of the full document


Entity body contains a complete HTTP message (see TRACE)

It is important to note that the Content-Type header specifies the media type of the original entity body. If the entity has gone through content ...

The best content for your career. Discover unlimited learning on demand for around $1/day.