HTTP协议头字段(header fields)索引

来源:互联网 发布:java io 断开的管道 编辑:程序博客网 时间:2024/06/04 23:36

HTTP协议完整规范参见W3C官方网站http://www.w3.org/Protocols/

http头的组成:

==============

 HTTP头字段包括4类:

       general-header ;

     request-header ;

       response-header ;

     entity-header .

 

*******************************************************************************

 General Header Fields

=============================

   general headerrequestresponse都可用的但是不能用于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-bodymetainformation(标题字段数据),

   如果当前没有body, 则定义被request确定的资源信息.

   一些metainformation是可选的一些是必须的。

 

       -- Allow

       -- Content-Encoding

       -- Content-Language

       -- Content-Length

       -- Content-Location

       -- Content-MD5

       -- Content-Range

       -- Content-Type

       -- Expires

       -- Last-Modified

       -- extension-header