HTTP/1.1 officially defines 47 directives (or headers); another directive (Content-Disposition),
previously used in some HTTP/1.0 implementations, is suggested, not not officially defined. The complete
list of headers is provided below.
| directive |
meaning |
Accept: |
specifies the media types accepted by the requested resource (text/html, image/jpeg...).
List of MIME types.
|
Accept-Charset: |
code page accepted for the response (greek alphabet...)
|
Accept-Encoding: |
same as Accept: but limits the encoding (gzip...)
|
Accept-Language: |
languages (used in the requested web page) accepted for the response
|
Accept-Ranges: |
the server says if it accepts the Range: directives
|
Age: |
used for caches. Tells the server the estimated age of the resource cached so that the
server can compare and possibly sends the new version.
|
Allow: |
lists all the methods (GET, PUT...) supported for the requested resource
|
Authorization: |
used by a client to authenticate itself to the server
|
Cache-Control: |
defines a cache policy for the resource (no-cache, public...). The list of policy can be
found page 108 of the RFC2616.
|
Connection: |
gives a list of particular parameters used for the connction (close, for instance, to
ask the server to close the connection after it has replied)
|
Content-Disposition: |
allows the server to suggest a default filename for the resource it is sending to the
client. This header is not an official HTTP/1.1 header; it is just suggested to use it.
|
Content-Encoding: |
completes media-type:. Tells what encoding (gzip...) is used for the resource.
|
Content-Language: |
language used in the resource
|
Content-Length: |
length (in byte) of the entity's body
|
Content-Location: |
(entity's header) tells the real URI of the provided resource if this resource has been
found at another location than the one specified in the request
|
Content-MD5: |
send an MD5 control code to the client to allow it to check the resource integrity
|
Content-Range: |
tells the range of the complete entity represented by the entity actually sent
|
Content-Type: |
media type of the entity's body (text/html; charset=ISO-8859-4 for instance)
|
Date: |
date to which the message was written
|
ETag: |
in the reply, it is the entity tag (sort of control code) of the version of the
requested entity. This allows a comparaison between what has been requested and what is
provided.
|
Expect: |
The client expects a specific behaviour from the server. the 417 status (Expectation
Failed) is used in this context.
|
Expires: |
date from which the reply must be considered as invalid
|
From: |
e-mail of the user that made the request
|
Host: |
tells the (virtual) server to which the request is performed
|
If-Match: |
used to make conditional requests based on ETags
|
If-Modified-Since: |
also used for conditional requests but based on the last update date of the resource
|
If-None-Match: |
used for conditional requests, contrary to If-Match:
|
If-Range: |
used in conditional requests to ask for a specific range of the resource, if this resource
has not been modified meanwhile (condition tested through a If-Unmodified-Since: for
instance)
|
If-Unmodified-Since: |
contrary to If-Modified-Since
|
Last-Modified: |
sends the last update date of the resource
|
Location: |
used to redirect a request to another URI
|
Max-Forwards: |
used with the TRACE and OPTIONS methods to tell the number of intermediates (proxy,
gateway) that can forward the request
|
Pragma: |
used to specify some behaviours for intermediates (no-cache, for instance, is used to
ask all intermediates not to cache the resource)
|
Proxy-Authenticate: |
used when a proxy asks the client (actually the user) to authenticate before going through
the request
|
Proxy-Authorization: |
reply provided by the client to a Proxy-Authenticate:
|
Range: |
tells the range (in byte) of the resource that is requested or sent
|
Referer: |
URI of the resource that is refering to the currently requested resource (for instance,
it is the URI of the web page that contains the link on which you have just clicked)
|
Retry-After: |
with a 503 status (Service Unavailable), tells how long the client should wait before
repeating the request (tells how long the resource is unavailable)
|
Server: |
tells what server (Apache for instance) is answering the query
|
TE: |
tells what Transfer-Encoding: extension the client accepts for the reply
|
Trailer: |
tells what directives are present in the trailer of the message encoded with "chunked
transfer-coding" (see Transfer-Encoding:)
|
Transfer-Encoding: |
tells what type of transformation has been performed on the entity's body to transfer
it correctly (chunked for example)
|
Upgrade: |
used by a client to tell what extra communication protocol (HTTP/2.0 for instance)
it supports and wishes to use if the server wants to change communication protocol
|
User-Agent: |
contains an identification code for the client (the program) that is making the
request (Mozilla/4.03 [us], for instance)
|
Vary: |
used in cache: tells the set of directives to use in a client-side request that allows
the cache to forward the reply as it is, without asking for another validation to the
server
|
Via: |
tells what intermediates (machines and protocols) the request has been gone through
before getting the server
|
Warning: |
additional information about the status or message transformation that could not be
specified by any other directive
|
WWW-Authenticate: |
is sent by the server with a 401 status (Unauthorized) to ask for an authentication
|