Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Searchable, convenient, complete TCP/IP information.
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP File and Message Transfer Applications and Protocols (FTP, TFTP, Electronic Mail, USENET, HTTP/WWW, Gopher)
                9  TCP/IP World Wide Web (WWW, "The Web") and the Hypertext Transfer Protocol (HTTP)
                     9  TCP/IP Hypertext Transfer Protocol (HTTP)
                          9  HTTP Entities, Transfers, Coding Methods and Content Management

Previous Topic/Section
HTTP Entities, Transfers, Coding Methods and Content Management
Previous Page
Pages in Current Topic/Section
1
2
3
Next Page
HTTP Data Transfer, Content Encodings and Transfer Encodings
Next Topic/Section

HTTP Entities and Internet Media Types
(Page 2 of 3)

Media Types and Subtypes

The most important concept that HTTP adopted from MIME was the use of standardized Internet media types, which describe the contents of an HTTP entity. Each media type consists of a top-level media type that defines its general nature, and a more specific subtype that indicates its form or structure. Additional parameters may also be supplied in some cases to provide more information to help a recipient interpret the entity. The formal syntax of an HTTP media type is the same as that used in MIME:

<type>/<subtype> [; parameter1 ; parameter2 … ; parameterN ]

To understand the difference between a top-level media type and a subtype we need only take a couple of examples. Text documents use the general type “text”; within this, subtypes exist such as “plain” for regular unformatted text and “html” for HTML documents. So, an HTML document of the type commonly transported using HTTP will be identified with a media type of “text/html”. Similarly, “image” is a top-level media type, and has subtypes such as “jpeg”, “gif” and “tiff”. Photographs usually use “image/jpeg”, while line drawings are often seen as “image/gif”.

HTTP's Use of Media Types

In HTTP, media types are most often seen in a special Content-Type entity header, which is present in any HTTP message that carries an entity. This header uses the same format as the header of the same name in MIME:

Content-Type: <type>/<subtype> [; parameter1 ; parameter2 … ; parameterN ]

The other place where media types are used in HTTP is in the Accept request header, which may appear in an HTTP request sent by a client. If present, the purpose of this header is to tell the server what sorts of media types the client can handle, so the server will not send a response that cannot be processed. For example, if a client can only process text documents, it might send a request specifying this in an Accept header. This is part of the overall content negotiation process supported by HTTP.

When a media type is specified in an Accept header, either the subtype, or both the type and subtype, can be replaced by the “*” wildcard to represent “any acceptable”. For example, in an Accept header, the specification “text/html” refers to an HTML document, while “text/*” means “any text type”. The string “*/*” means any type of media; this is usually used in combination with a “q” value as explained in the topic on the HTTP content negotiation process.

Related Information: I provide a more complete description of both the Content-Type header and Internet media types, including a description of many types and subtypes, in the topic on media types in the MIME section. HTTP can also support composite media types, such as the multipart media type.


Key Concept: While HTTP is naturally most often associated with hypertext, its messages can transport a large variety of different types of files, including images, audio, video and much more. To indicate the type of entity contained in an HTTP message, its sender must identify its media type and subtype. This is done using the HTTP Content-Type header, which was borrowed from the Multipurpose Internet Mail Extensions (MIME) specification.



Previous Topic/Section
HTTP Entities, Transfers, Coding Methods and Content Management
Previous Page
Pages in Current Topic/Section
1
2
3
Next Page
HTTP Data Transfer, Content Encodings and Transfer Encodings
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.