以下列出了HTTP协议1.1的所有头部结构,包括通用头,请求头,响应头,实体头部消息。
有一些你可能找不到,比如PROTOCAL,那是因为它是在请求行里。
4.5 General Header Fields
There are a few header fields which have general applicability
for both request and response messages, but which do not apply
to the entity being transferred. These header fields apply only
to the
message being transmitted.
general-header = Cache-Control ; Section 14.9
| Connection ; Section 14.10
| Date ; Section 14.18
| Pragma ; Section 14.32
| Trailer ; Section 14.40
| Transfer-Encoding ; Section 14.41
| Upgrade ; Section 14.42
| Via ; Section 14.45
| Warning ; Section 14.46
5.3 Request Header Fields
The request-header fields allow the client to pass additional
information about the request, and about the client itself, to
the server. These fields act as request modifiers, with
semantics equivalent to the parameters on a programming language
method invocation.
request-header = Accept ; Section 14.1
| Accept-Charset ; Section 14.2
| Accept-Encoding ; Section 14.3
| Accept-Language ; Section 14.4
| Authorization ; Section 14.8
| Expect ; Section 14.20
| From ; Section 14.22
| Host ; Section 14.23
| If-Match ; Section 14.24
| If-Modified-Since ; Section 14.25
| If-None-Match ; Section 14.26
| If-Range ; Section 14.27
| If-Unmodified-Since ; Section 14.28
| Max-Forwards ; Section 14.31
| Proxy-Authorization ; Section 14.34
| Range ; Section 14.35
| Referer ; Section 14.36
| TE ; Section 14.39
| User-Agent ; Section 14.43
6.2 Response Header Fields
The response-header fields allow the server to pass additional
information about the response which cannot be placed in the
Status- Line. These header fields give information about the
server and about further access to the resource identified by
the Request-URI.
response-header = Accept-Ranges ; Section 14.5
| Age ; Section 14.6
| ETag ; Section 14.19
| Location ; Section 14.30
| Proxy-Authenticate ; Section 14.33
| Retry-After ; Section 14.37
| Server ; Section 14.38
| Vary ; Section 14.44
| WWW-Authenticate ; Section 14.47
7 Entity
Request and Response messages MAY transfer an entity if not
otherwise restricted by the request method or response status
code. An entity consists of entity-header fields and an
entity-body, although some responses will only include the
entity-headers.
In this section, both sender and recipient refer to either the
client or the server, depending on who sends and who receives
the entity.
7.1 Entity Header Fields
Entity-header fields define metainformation about the
entity-body or, if no body is present, about the resource
identified by the request. Some of this metainformation is
OPTIONAL; some might be REQUIRED by portions of this
specification.
entity-header = Allow ; Section 14.7
| Content-Encoding ; Section 14.11
| Content-Language ; Section 14.12
| Content-Length ; Section 14.13
| Content-Location ; Section 14.14
| Content-MD5 ; Section 14.15
| Content-Range ; Section 14.16
| Content-Type ; Section 14.17
| Expires ; Section 14.21
| Last-Modified ; Section 14.29
| extension-header