HTTP_HEADER_ID Enumeration

The HTTP_HEADER_ID enumeration type lists known headers for HTTP requests and responses, and associates an array index with each such header. It is used to size and access the KnownHeaders array members of the HTTP_REQUEST_HEADERS and HTTP_RESPONSE_HEADERS structures.

Syntax

typedef enum _HTTP_HEADER_ID {
  HttpHeaderCacheControl         = 0,
  HttpHeaderConnection           = 1,
  HttpHeaderDate                 = 2,
  HttpHeaderKeepAlive            = 3,
  HttpHeaderPragma               = 4,
  HttpHeaderTrailer              = 5,
  HttpHeaderTransferEncoding     = 6,
  HttpHeaderUpgrade              = 7,
  HttpHeaderVia                  = 8,
  HttpHeaderWarning              = 9,
  HttpHeaderAllow                = 10,
  HttpHeaderContentLength        = 11,
  HttpHeaderContentType          = 12,
  HttpHeaderContentEncoding      = 13,
  HttpHeaderContentLanguage      = 14,
  HttpHeaderContentLocation      = 15,
  HttpHeaderContentMd5           = 16,
  HttpHeaderContentRange         = 17,
  HttpHeaderExpires              = 18,
  HttpHeaderLastModified         = 19,
  HttpHeaderAccept               = 20,
  HttpHeaderAcceptCharset        = 21,
  HttpHeaderAcceptEncoding       = 22,
  HttpHeaderAcceptLanguage       = 23,
  HttpHeaderAuthorization        = 24,
  HttpHeaderCookie               = 25,
  HttpHeaderExpect               = 26,
  HttpHeaderFrom                 = 27,
  HttpHeaderHost                 = 28,
  HttpHeaderIfMatch              = 29,
  HttpHeaderIfModifiedSince      = 30,
  HttpHeaderIfNoneMatch          = 31,
  HttpHeaderIfRange              = 32,
  HttpHeaderIfUnmodifiedSince    = 33,
  HttpHeaderMaxForwards          = 34,
  HttpHeaderProxyAuthorization   = 35,
  HttpHeaderReferer              = 36,
  HttpHeaderRange                = 37,
  HttpHeaderTe                   = 38,
  HttpHeaderTranslate            = 39,
  HttpHeaderUserAgent            = 40,
  HttpHeaderRequestMaximum       = 41,
  HttpHeaderAcceptRanges         = 20,
  HttpHeaderAge                  = 21,
  HttpHeaderEtag                 = 22,
  HttpHeaderLocation             = 23,
  HttpHeaderProxyAuthenticate    = 24,
  HttpHeaderRetryAfter           = 25,
  HttpHeaderServer               = 26,
  HttpHeaderSetCookie            = 27,
  HttpHeaderVary                 = 28,
  HttpHeaderWwwAuthenticate      = 29,
  HttpHeaderResponseMaximum      = 30,
  HttpHeaderMaximum              = 41 
} HTTP_HEADER_ID, *PHTTP_HEADER_ID;

Constants

HttpHeaderCacheControl

Used to specify caching behavior along the request or response chain, overriding the default caching algorithm.

HttpHeaderConnection

Allows the sender to specify options that are desired for that particular connection. These are used for a single connection only and must not be communicated by proxies over further connections.

HttpHeaderDate

The Date is a general header field that indicates the time that the request or response was sent.

HttpHeaderKeepAlive

Based on the keepalive XML element (see RFC 2518, section 12.12.1, page 66); a list of URIs included in the KeepAlive header must be "live" after they are copied (moved) to the destination.

HttpHeaderPragma

Used to include optional, implementation-specific directives that might apply to any recipient along the request/response chain.

HttpHeaderTrailer

Indicates that specified header fields are present in the trailer of a message encoded with chunked transfer-coding.

HttpHeaderTransferEncoding

Indicates what, if any, transformations have been applied to the message body in transit.

HttpHeaderUpgrade

Allows the client to specify one or more other communication protocols it would prefer to use if the server can comply.

HttpHeaderVia

The Via header field indicates the path taken by the request.

HttpHeaderWarning

This is a response header that contains the 3-digit warn code along with the reason phrase.

HttpHeaderAllow

Lists the set of methods supported by the resource identified by the Request-URI.

HttpHeaderContentLength

The size of the message body in decimal bytes.

HttpHeaderContentType

The media type of the message body.

HttpHeaderContentEncoding

The encoding scheme for the message body.

HttpHeaderContentLanguage

Provides the natural language of the intended audience.

HttpHeaderContentLocation

Location of the resource for the entity enclosed in the message when that entity is accessible from a location separate from the requested resource's URI.

HttpHeaderContentMd5

An MD5 digest of the entity-body used to provide end-to-end message integrity check (MIC) of the entity-body.

HttpHeaderContentRange

The content range header is sent with a partial entity body to specify where in the full entity body the partial body should be applied.

HttpHeaderExpires

The date and time after which the message content expires.

HttpHeaderLastModified

Indicates the date and time at which the origin server believes the variant was last modified.

HttpHeaderAccept

Used with the INVITE, OPTIONS, and REGISTER methods to indicate what media types are acceptable in the response.

HttpHeaderAcceptCharset

Indicates the character sets that are acceptable for the response.

HttpHeaderAcceptEncoding

The content encodings that are acceptable in the response.

HttpHeaderAcceptLanguage

Used by the client to indicate to the server which language it would prefer to receive reason phrases, session descriptions, or status responses.

HttpHeaderAuthorization

The user-agent can authenticate itself with a server by sending the Authorization request header field with the request. The field contains the credentials for the domain that the user is requesting.

HttpHeaderCookie

TBD

HttpHeaderExpect

Indicates the specific server behaviors that are required by the client.

HttpHeaderFrom

The From header field specifies the initiator of the SIP request or response message.

HttpHeaderHost

Specifies the Internet host and port number of the requested resource. This is obtained from the original URI given by the user or referring resource.

HttpHeaderIfMatch

The If-Match request header field is used with a method to make it conditional. A client that has one or more entities previously obtained from the resource can verify that one of those entities is current by including a list of their associated entity tags in the If-Match header field.

HttpHeaderIfModifiedSince

The If-Modified-Since request header field is used with a method to make it conditional. If the requested variant has not been modified since the time specified in this field, an entity is not returned from the server; instead, a 304 (not modified) response is returned without any message-body.

HttpHeaderIfNoneMatch

The If-None-Match request-header field is used with a method to make it conditional. When a client has obtained one or more entities from a resource, it can verify that none of those entities is current by including a list of their associated entity tags in the If-None-Match header field. The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead, and to prevent a method such as PUT from inadvertently modifying an existing resource when the client believes that the resource does not exist.

HttpHeaderIfRange

If a client has a partial copy of an entity in its cache, and wishes to obtain an up-to-date copy of the entire entity, it can use the If-Range header. Informally, its meaning is, "if the entity is unchanged, send me the part(s) I am missing; otherwise, send me the entire new entity."

HttpHeaderIfUnmodifiedSince

The If-Unmodified-Since request-header field is used with a method to make it conditional. If the requested resource has not been modified since the time specified in this field, the server performs the requested operation as if the If-Unmodified-Since header were not present, but if the requested resource has been modified, the server returns a 412 error (Precondition Failed).

HttpHeaderMaxForwards

The maximum number of proxies or gateways that can forward the request.

HttpHeaderProxyAuthorization

This header field is used by the client to identify itself with a proxy.

HttpHeaderReferer

Allows the client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained.

HttpHeaderRange

Allows a client to request a part of an entity instead of the whole.

HttpHeaderTe

This header field contains the recipient of the SIP request or response message.

HttpHeaderTranslate

TBD

HttpHeaderUserAgent

Indicates what extension transfer-codings the client accepts in the response and whether or not the client accepts trailer fields in a chunked transfer-coding.

HttpHeaderRequestMaximum

Not a value that actually designates a header; instead, it is used to count the enumerated Request headers.

HttpHeaderAcceptRanges

Allows the server to indicate its acceptance of range requests for a resource.

HttpHeaderAge

Conveys the sender's estimate of the amount of time since the response (or its revalidation) was generated at the origin server.

HttpHeaderEtag

Provides the current value of the entity tag for the requested variant.

HttpHeaderLocation

Used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource.

HttpHeaderProxyAuthenticate

The response field that must be included as a part of the 407 response. The field includes the authentication scheme and parameters that apply to the proxy for this Request-URI.

HttpHeaderRetryAfter

The length of time that the service is expected to be unavailable to the requesting client.

HttpHeaderServer

This is a response header field that contains information about the server that is handling the request.

HttpHeaderSetCookie

TBD

HttpHeaderVary

Indicates the set of request header fields that fully determines, while the response is fresh, whether a cache is permitted to use the response to reply to a subsequent request without revalidation.

HttpHeaderWwwAuthenticate

The WWW_Authenticate header field contains the authentication schemes and parameters applicable to the Request-URI.

HttpHeaderResponseMaximum

Not a value that actually designates a header; instead, it is used to count the enumerated Response headers.

HttpHeaderMaximum

Not a value that actually designates a header; instead, it is used to count all the enumerated headers.

Enumeration Values

This enumeration serves to identify the significance of index values in the KnownHeaders arrays of the HTTP_REQUEST_HEADERS structure and the HTTP_RESPONSE_HEADERS structure.

The usage of most of the headers identified in this enumeration is documented in RFC 2616, in Section 14. Some, such as HttpHeaderKeepAlive, come from the WebDAV standard (RFC 2518), and others, such as HttpHeaderCookie, are widely used.

However, HttpHeaderRequestMaximum, HttpHeaderResponseMaximum and HttpHeaderMaximum are used only to terminate sections of the enumeration, and are not associated with HTTP header names.

Note that both request and response headers are enumerated, in overlapping ranges, and that there is a different overall count for request headers than for response headers (in other words, HttpHeaderRequestMaximum does not equal HttpHeaderResponseMaximum).

Requirements

Minimum supported clientWindows Vista, Windows XP with SP2
Minimum supported serverWindows Server 2003
HeaderHttp.h

See Also

HTTP_REQUEST_HEADERS
HTTP_RESPONSE_HEADERS

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags :


Page view tracker