19.4 Entity HeadersEntity headers are used in both client requests and server responses. They supply information about the entity body in an HTTP message. AllowAllow: methods Contains a comma-separated list of methods that are allowed at a specified URI. In a server response it is used with code 405 (Method Not Allowed) to inform the client of valid methods available for the requested information. See Chapter 17, HTTP Overview for more information on HTTP methods. Content-BaseContent-Base: uri Specifies the base URI for resolving relative URLs. The base URI must be written as an absolute URI. Content-EncodingContent-Encoding: encoding_schemes Specifies the encoding scheme(s) used for the transferred entity body. Values are gzip (or x-gzip) and compress (or x-compress). If multiple encoding schemes are specified (in a comma-separated list), they must be listed in the order in which they were applied to the source data. Content-LanguageContent-Language: languages Specifies the language(s) that the transferred entity body is intended for. Languages are represented by their 2-digit code (e.g., en for English, fr for French). Content-LengthContent-Length: n This header specifies the length of the data (in bytes) of the transferred entity body. Due to the dynamic nature of some requests, the content length is sometimes unknown and this header is omitted. Content-LocationContent-Location: uri Supplies the URI for the entity, in cases where a document has multiple entities with separately accessible locations. The URI can be either an absolute or relative URI. Content-MD5Content-MD5: digest Supplies a MD5 digest of the entity, for checking the integrity of the message upon receipt. Content-RangeContent-Range: bytes n-m/length Specifies where the accompanying partial entity body should be inserted, and the total size of the full entity body. For example:
Content-Range: bytes 6143-7166/15339 Content-Transfer-EncodingContent-Transfer-Encoding: scheme This header specifies any transformations that are applied to the entity body for transport over a network. Common values are: 7bit, 8bit, binary, base64, and quoted-printable. Content-TypeContent-Type: type/subtype This header describes the media type and subtype of an entity body. It uses the same values as the client's Accept header, and the server should return media types that conform with the client's preferred formats. ETagETag: entity_tag Defines the entity tag for use with the If-Match and If-None-Match request headers. ExpiresExpires: date This header specifies the time when a document may change or its information becomes invalid. After that time, the document may or may not change or be deleted. The value is a date and time in a valid format as described for the Date header. Last-ModifiedLast-Modified: date This header specifies when the specified URI was last modified. The value is a date and time in a valid format as described for the Date header. LocationLocation: uri This header specifies the new location of a document, usually with response codes 201 (Created), 301 (Moved Permanently), or 302 (Moved Temporarily). The URI given must be written as an absolute URI. URIURI: <uri> This header specifies the new location of a document, usually with response codes 201 (Created), 301 (Moved Permanently), or 302 (Moved Temporarily). An optional vary parameter may also be used in this header indicating multiple documents at the URI in the following categories: type, language, version, encoding, charset, and user-agent. Sending these parameters in a server response prompts the client to specify its preferences appropriately in the new request. The URI header is deprecated in HTTP 1.1 in favor of the Location, Content-Location, and Vary headers. |
|