Appendix B. HTTP Headers

Table B-1. Message headers
HeaderDescriptionReference

Cache-Control

Gives instructions to caching mechanisms that the request/response passes through related to its cachability.

http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-21#section-7.2

Connection

Gives options that are specific to the current connection and should not be passed on to proxies.

http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21#section-6.1

Date

Specifies the date and time the message originated.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-8.1.1.2

Pragma

Specifies to caches that they should always revalidate a response they have cached. It exists for backward compatibility with HTTP 1.0 clients and is deprecated in HTTP 1.1 by the Cache-Control header.

http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-21#section-7.4

Transfer-Encoding

Indicates if the message body has had any transformation applied to it in order to transfer it between the sender and the recepient.

http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21#section-3.3.1

Upgrade

Allows the client to specify that it would like to use additional protocols if the server is willing to switch.

http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21#section-6.3

Via

Used by gateways and proxies, it contains the intermediate protocols and recepients between the client and the server on requests, and the server and client on responses. This header is very useful in a response from a TRACE request.

http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21#section-5.7

Warning

Used to carry additional information about the message that may not be reflected in the mesage itself.

http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21#section-5.7

Table B-2. Request headers
HeaderDescriptionReference

Host

Provides the host and port information in the target URI.

http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21#section-5.4

Max-Forwards

For use with debugging with TRACE and OPTION methods, this header allows the client to limit the number of times that the request can be forwarded by proxies.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.1.1

Expect

Tells the server expected behavior from the client. For example, Expect: 100-Continue tells the server the client expects it to process the request before it starts sending the body.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.1.2

Range

Specifies that the server should perform a byte-range operation and return only the requested bytes.

http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-21#section-5.4

If-Match

Used to make a conditional request that should be performed only if the value of the entity tag matches one or more representations of the resource

http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-21#section-3.1

If-None-Match

Used to make a conditional request that should be performed only if the value of the entity tag does not match one or more representations of the resource.

http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-21#section-3.2

If-Modified-Since

Used to make a conditional request that should be performed only if the resource has been modified since the specified date.

http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-21#section-3.3

If-Unmodified-Since

Used to make a conditional request that should be performed only if the resource has not been modified since the specified date.

http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-21#section-3.4

If-Range

Used to make a conditional request that allows a client to get a partial representation returned as long as the entity tag matches.

http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-21#section-3.5

Accept

Contains a prioritized list of acceptable response media types for the response.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.3.2

Accept-Charset

Contains a prioritized list of acceptable character encodings for the response.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.3.3

Accept-Encoding

Contains a prioritized list of acceptable transfer codings.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.3.4

Accept-Language

Contains a prioritized list of languages.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.3.5

From

Specifies the email for the human who is making the request.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.5.1

Referer

Specifies the URI for the resource that provided the target URI for the current request.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.5.2

TE

Indicates acceptable transfer codings, besides “chunked.”

http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-21#section-4.3

User-Agent

Specifies information about the client generating the request.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-6.5.3

Authorization

Contains credentials for the realm being accessed.

http://tools.ietf.org/html/draft-ietf-httpbis-p7-auth-21#section-4.1

Table B-3. Response headers
HeaderDescriptionReference

Age

Specifies how much time has elapsed since the response was generated.

http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-21#section-7.1

Date

Specifies the date and time when the message was generated.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-8.1.1.2

Location

Specifies a resource that is associated with the response (either a resource that was created or one that the client should redirect to).

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-8.1.1.2

Retry-After

Indicates how long the client should wait before retrying a request to the resource. In the case of a redirect, it relates to the redirect URI.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-8.1.1.3

Last-Modified

Specifies the date and time at which the origin server believes the representation was modified.

http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-21#section-2.2

ETag

Specifies an identifier that is unique to the currently selected representation.

http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-21#section-2.3

Vary

Indicates which header fields were used as part of selecting the representation returned to the client.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-8.2.1

WWW-Authenticate

Indicates one or more authentication challenges informing the client how they must authenticate to the target resource.

http://tools.ietf.org/html/draft-ietf-httpbis-p7-auth-21#section-4.4

Proxy-Authenticate

Specifies one or more authentication challenges informing the client how they must authenticate to the proxy for the target resource.

http://tools.ietf.org/html/draft-ietf-httpbis-p7-auth-21#section-4.2

Accept-Ranges

Specifies the acceptable ranges clients may use with a range request.

http://tools.ietf.org/html/draft-ietf-httpbis-p5-range-21#section-5.1

Allow

Specifies which HTTP methods are acceptable to the target resource.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-8.4.1

Server

Contains information about the server environment for the origin server.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-8.4.2

Table B-4. Representation headers
HeaderDescriptionReference

Content-Type

Specifies the media type of the representation.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-3.1.1.5

Content-Encoding

Specifies the content codings that have been applied to the representation.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-3.1.2.2

Content-Language

Indicates the language for the intended audience of the current representation.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-3.1.1.5

Content-Location

Specifies a URI for specifically retrieving the current representation.

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-3.1.4.2

Expires

Gives the date and time for when the response is considered stale.

http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-21#section-7.3

Get Designing Evolvable Web APIs with ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.