HTTP Header详解

本文详细解析了HTTP头字段的四大类:通用头字段、请求头字段、响应头字段及实体头字段,涵盖了从缓存控制到实体元信息的全面内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

转载地址:http://blog.sina.com.cn/s/blog_6ce2999701012w15.html

HTTP头字段包括4类:

   general-header;

   request-header;

   response-header;

   entity-header;

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

General Header Fields

general header是request、response都可用的,但是不能用于entity.

      -- Cache-Control

      -- Connection

      -- Date

      -- Pragma

      -- Trailer

      -- Upgrade

      -- Via

      --Warning

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

Request Header Fields

request-header fields 允许客户端传递关于request和客户端的附加信息到服务端

         -- Accept

         -- Accept-Charset

         -- Accept-Language

         -- Authorization

         -- Expect

         -- From

         -- Host

         -- If-Match

         -- If-Modified-Since

         -- If-None-Match

         -- If-Range

         -- 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-Length

      --Content-Location

      --Content-MD5

      --Content-Range

      --Content-Type

      --Expires

      --Last-Modified

      --extension-header

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值