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

来源:互联网 发布:md5加密java代码 32位 编辑:程序博客网 时间:2024/05/22 18:01
http的header fields在开发的web部分经常用到,今天机器网络有些异常,在做协议抓包分析的时候想起做一份完整的header fields索引,用到的时候可以按照索引查阅http规范。
 
(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
       -- extension-header
 
原创粉丝点击