Posted on 2007-03-12 15:08
Hally 閱讀(2110)
評論(0) 編輯 收藏 所屬分類:
技術文章轉載
?
(
HTTP
協議完整規范參見
W3C
官方網站
http://www.w3.org/Protocols/
)
?
http
頭的組成:
==============
?
HTTP
頭字段包括
4
類:
?????? general-header ;
?? ? request-header ;
?????? response-header ;
?? ? entity-header .
?
*******************************************************************************
?
General Header Fields
=============================
?? general header
是
request
、
response
都可用的
,
但是不能用于
entity.
?
?
??????
--
Cache-Control
??????
--
Connection
??????
--
Date
??????
--
Pragma
??????
--
Trailer
??????
--
Transfer-Encoding
??????
--
Upgrade
??????
--
Via
??????
--
Warning
?
*******************************************************************************
?
Request Header Fields
======================
?
?? request-header fields
允許客戶端傳遞關于
request
和客戶端的附加信息到服務端,
?
??????
--
Accept
??????
--
Accept-Charset
??????
--
Accept-Encoding
??????
--
Accept-Language
??????
--
Authorization
??????
--
Expect
??????
--
From
??????
--
Host
??????
--
If-Match
??????
--
If-Modified-Since
??????
--
If-None-Match
??????
--
If-Range
??????
--
If-Unmodified-Since
??????
--
Max-Forwards
??????
--
Proxy-Authorization
??????
--
Range
??????
--
Referer
??????
--
TE
??????
--
User-Agent
?
*******************************************************************************
?
?Response Header Fields
===============================
?
?? response-header fields
允許服務端傳遞關于
response
的、不能放到
Status-Line
的附加信息。
??
這些頭給出關于服務端的信息。
??
?
?????
--
Accept-Ranges
?????
--
Age
?????
--
ETag
?????
--
Location
?????
--
Proxy-Authenticate
?????
--
Retry-After
?????
--
Server
?????
--
Vary
?????
--
WWW-Authenticate
?
*******************************************************************************
?
Entity Header Fields
========================
?
?? Entity-header fields
定義關于
entity-body
的
metainformation(
標題字段數據
),
??
如果當前沒有
body,
則定義被
request
確定的資源信息
.
??
一些
metainformation
是可選的
;
一些是必須的。
?
??????
--
Allow
??????
--
Content-Encoding
??????
--
Content-Language
??????
--
Content-Length
??????
--
Content-Location
??????
--
Content-MD5
??????
--
Content-Range
??????
--
Content-Type
??????
--
Expires
??????
--
Last-Modified