<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">HTTP&nbsp;</span><span style="font-family:&quot;">头部解释</span> 

</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">1.&nbsp;Accept</span><span style="font-family:&quot;">:告诉</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器自己接受什么介质类型,</span><span style="font-family:&quot;">*/*&nbsp;</span><span style="font-family:&quot;">表示任何类型,</span><span style="font-family:&quot;">type/*&nbsp;</span><span style="font-family:&quot;">表示该类型下的所有子类型,</span><span style="font-family:&quot;">type/sub-type</span><span style="font-family:&quot;">。</span> 

</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">2.&nbsp;Accept-Charset</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">&nbsp;&nbsp;&nbsp;</span><span style="font-family:&quot;">浏览器申明自己接收的字符集</span><br />

<span style="font-family:Microsoft YaHei;"> Accept-Encoding</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">  </span><span style="font-family:&quot;">浏览器申明自己接收的编码方法,通常指定压缩方法,是否支持压缩,支持什么压缩方法</span><span style="font-family:&quot;">  </span><span style="font-family:&quot;">(</span><span style="font-family:&quot;">gzip</span><span style="font-family:&quot;">,</span><span style="font-family:&quot;">deflate</span><span style="font-family:&quot;">)</span>

<span style="font-family:Microsoft YaHei;"> Accept-Language</span><span style="font-family:&quot;">::浏览器申明自己接收的语言语言跟字符集的区别:中文是语言,中文有多种字符集,比如</span><span style="font-family:&quot;">big5</span><span style="font-family:&quot;">,</span><span style="font-family:&quot;">gb2312</span><span style="font-family:&quot;">,</span><span style="font-family:&quot;">gbk</span><span style="font-family:&quot;">等等。</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">3.&nbsp;Accept-Ranges</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器表明自己是否接受获取其某个实体的一部分(比如文件的一部分)的请求。</span><span style="font-family:&quot;">bytes</span><span style="font-family:&quot;">:表示接受,</span><span style="font-family:&quot;">none</span><span style="font-family:&quot;">:表示不接受。</span> 

</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">4.&nbsp;Age</span><span style="font-family:&quot;">:当代理服务器用自己缓存的实体去响应请求时,用该头部表明该实体从产生到现在经过多长时间了。</span> 

</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">5.&nbsp;Authorization</span><span style="font-family:&quot;">:当客户端接收到来自</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器的&nbsp;</span><span style="font-family:&quot;">WWW-Authenticate&nbsp;</span><span style="font-family:&quot;">响应时,该头部来回应自己的身份验证信息给</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器。</span> 

</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">6.&nbsp;Cache-Control</span><span style="font-family:&quot;">:请求:</span><span style="font-family:&quot;">no-cache</span><span style="font-family:&quot;">(不要缓存的实体,要求现在从</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器去取)</span><br />

<span style="font-family:Microsoft YaHei;"> max-age</span><span style="font-family:&quot;">:(只接受 </span><span style="font-family:&quot;">Age </span><span style="font-family:&quot;">值小于 </span><span style="font-family:&quot;">max-age </span><span style="font-family:&quot;">值,并且没有过期的对象)</span>

<span style="font-family:Microsoft YaHei;"> max-stale</span><span style="font-family:&quot;">:(可以接受过去的对象,但是过期时间必须小于 </span>

<span style="font-family:Microsoft YaHei;"> max-stale </span><span style="font-family:&quot;">值)</span>

<span style="font-family:Microsoft YaHei;"> min-fresh</span><span style="font-family:&quot;">:(接受其新鲜生命期大于其当前 </span><span style="font-family:&quot;">Age </span><span style="font-family:&quot;">跟 </span><span style="font-family:&quot;">min-fresh </span><span style="font-family:&quot;">值之和的</span>

<span style="font-family:&quot;">缓存对象)</span>

<span style="font-family:&quot;">响应:</span><span style="font-family:&quot;">public(</span><span style="font-family:&quot;">可以用 </span><span style="font-family:&quot;">Cached </span><span style="font-family:&quot;">内容回应任何用户</span><span style="font-family:&quot;">)</span>

<span style="font-family:Microsoft YaHei;"> private</span><span style="font-family:&quot;">(只能用缓存内容回应先前请求该内容的那个用户)</span>

<span style="font-family:Microsoft YaHei;"> no-cache</span><span style="font-family:&quot;">(可以缓存,但是只有在跟</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器验证了其有效后,才能返回给客户端)</span>

<span style="font-family:Microsoft YaHei;"> max-age</span><span style="font-family:&quot;">:(本响应包含的对象的过期时间)</span>

<span style="font-family:Microsoft YaHei;"> ALL:  no-store</span><span style="font-family:&quot;">(不允许缓存)</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">7.&nbsp;Connection</span><span style="font-family:&quot;">:请求:</span><span style="font-family:&quot;">close</span><span style="font-family:&quot;">(告诉</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器或者代理服务器,在完成本次请求的响应</span><br />

<span style="font-family:&quot;">后,断开连接,不要等待本次连接的后续请求了)。</span>

<span style="font-family:Microsoft YaHei;"> keepalive</span><span style="font-family:&quot;">(告诉</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器或者代理服务器,在完成本次请求的</span>

<span style="font-family:&quot;">响应后,保持连接,等待本次连接的后续请求)。</span>

<span style="font-family:&quot;">响应:</span><span style="font-family:&quot;">close</span><span style="font-family:&quot;">(连接已经关闭)。</span>

<span style="font-family:Microsoft YaHei;"> keepalive</span><span style="font-family:&quot;">(连接保持着,在等待本次连接的后续请求)。</span>

<span style="font-family:Microsoft YaHei;"> Keep-Alive</span><span style="font-family:&quot;">:如果浏览器请求保持连接,则该头部表明希望 </span><span style="font-family:&quot;">WEB </span><span style="font-family:&quot;">服务器保持</span>

<span style="font-family:&quot;">连接多长时间(秒)。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Keep-Alive</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">300</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">8.&nbsp;Content-Encoding</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器表明自己使用了什么压缩方法(</span><span style="font-family:&quot;">gzip</span><span style="font-family:&quot;">,</span><span style="font-family:&quot;">deflate</span><span style="font-family:&quot;">)压缩响应中的对象。</span><span style="font-family:&quot;">&nbsp;</span><br />

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Content-Encoding</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">gzip                   </span>

<span style="font-family:Microsoft YaHei;"> Content-Language</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">WEB </span><span style="font-family:&quot;">服务器告诉浏览器自己响应的对象的语言。</span>

<span style="font-family:Microsoft YaHei;"> Content-Length</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">    WEB </span><span style="font-family:&quot;">服务器告诉浏览器自己响应的对象的长度。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Content-Length: 26012</span>

<span style="font-family:Microsoft YaHei;"> Content-Range</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">    WEB </span><span style="font-family:&quot;">服务器表明该响应包含的部分对象为整个对象的哪个部分。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Content-Range: bytes 21010-47021/47022</span>

<span style="font-family:Microsoft YaHei;"> Content-Type</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">      WEB </span><span style="font-family:&quot;">服务器告诉浏览器自己响应的对象的类型。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Content-Type</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">application/xml</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">9.&nbsp;ETag</span><span style="font-family:&quot;">:就是一个对象(比如</span><span style="font-family:&quot;">URL</span><span style="font-family:&quot;">)的标志值,就一个对象而言,比如一个&nbsp;</span><span style="font-family:&quot;">html&nbsp;</span><span style="font-family:&quot;">文件,</span><br />

<span style="font-family:&quot;">如果被修改了,其 </span><span style="font-family:&quot;">Etag </span><span style="font-family:&quot;">也会别修改, 所以,</span><span style="font-family:&quot;">ETag </span><span style="font-family:&quot;">的作用跟 </span><span style="font-family:&quot;">Last-Modified </span><span style="font-family:&quot;">的</span>

<span style="font-family:&quot;">作用差不多,主要供 </span><span style="font-family:&quot;">WEB </span><span style="font-family:&quot;">服务器 判断一个对象是否改变了。</span>

<span style="font-family:&quot;">比如前一次请求某个 </span><span style="font-family:&quot;">html </span><span style="font-family:&quot;">文件时,获得了其 </span><span style="font-family:&quot;">ETag</span><span style="font-family:&quot;">,当这次又请求这个文件时,</span><span style="font-family:&quot;"> </span>

<span style="font-family:&quot;">浏览器就会把先前获得的 </span><span style="font-family:&quot;">ETag </span><span style="font-family:&quot;">值发送给</span><span style="font-family:&quot;">  WEB </span><span style="font-family:&quot;">服务器,然后 </span><span style="font-family:&quot;">WEB </span><span style="font-family:&quot;">服务器</span>

<span style="font-family:&quot;">会把这个 </span><span style="font-family:&quot;">ETag </span><span style="font-family:&quot;">跟该文件的当前 </span><span style="font-family:&quot;">ETag </span><span style="font-family:&quot;">进行对比,然后就知道这个文件</span>

<span style="font-family:&quot;">有没有改变了。</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">10.&nbsp;Expired</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器表明该实体将在什么时候过期,对于过期了的对象,只有在</span><br />

<span style="font-family:&quot;">跟</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器验证了其有效性后,才能用来响应客户请求。</span>

<span style="font-family:&quot;">是 </span><span style="font-family:&quot;">HTTP/1.0 </span><span style="font-family:&quot;">的头部。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Expires</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Sat, 23 May 2009 10:02:12 GMT</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">11.&nbsp;Host</span><span style="font-family:&quot;">:客户端指定自己想访问的</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器的域名</span><span style="font-family:&quot;">/IP&nbsp;</span><span style="font-family:&quot;">地址和端口号。</span><br />

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Host</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">rss.sina.com.cn</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">12.&nbsp;If-Match</span><span style="font-family:&quot;">:如果对象的&nbsp;</span><span style="font-family:&quot;">ETag&nbsp;</span><span style="font-family:&quot;">没有改变,其实也就意味著对象没有改变,才执行请求的动作。</span><br />

<span style="font-family:Microsoft YaHei;"> If-None-Match</span><span style="font-family:&quot;">:如果对象的 </span><span style="font-family:&quot;">ETag </span><span style="font-family:&quot;">改变了,其实也就意味著对象也改变了,才执行请求的动作。</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">13.&nbsp;If-Modified-Since</span><span style="font-family:&quot;">:如果请求的对象在该头部指定的时间之后修改了,才执行请求</span><br />

<span style="font-family:&quot;">的动作(比如返回对象),否则返回代码</span><span style="font-family:&quot;">304</span><span style="font-family:&quot;">,告诉浏览器该对象</span>

<span style="font-family:&quot;">没有修改。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">If-Modified-Since</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Thu, 10 Apr 2008 09:14:42 GMT</span>

<span style="font-family:Microsoft YaHei;"> If-Unmodified-Since</span><span style="font-family:&quot;">:如果请求的对象在该头部指定的时间之后没修改过,才执行</span>

<span style="font-family:&quot;">请求的动作(比如返回对象)。</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">14.&nbsp;If-Range</span><span style="font-family:&quot;">:浏览器告诉&nbsp;</span><span style="font-family:&quot;">WEB&nbsp;</span><span style="font-family:&quot;">服务器,如果我请求的对象没有改变,就把我缺少的部分</span><br />

<span style="font-family:&quot;">给我,如果对象改变了,就把整个对象给我。 浏览器通过发送请求对象的 </span>

<span style="font-family:Microsoft YaHei;"> ETag </span><span style="font-family:&quot;">或者 自己所知道的最后修改时间给 </span><span style="font-family:&quot;">WEB </span><span style="font-family:&quot;">服务器,让其判断对象是否</span>

<span style="font-family:&quot;">改变了。</span>

<span style="font-family:&quot;">总是跟 </span><span style="font-family:&quot;">Range </span><span style="font-family:&quot;">头部一起使用。</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">15.&nbsp;Last-Modified</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">WEB&nbsp;</span><span style="font-family:&quot;">服务器认为对象的最后修改时间,比如文件的最后修改时间,</span><br />

<span style="font-family:&quot;">动态页面的最后产生时间等等。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Last-Modified</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Tue, 06 May 2008 02:42:43 GMT</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">16.&nbsp;Location</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">WEB&nbsp;</span><span style="font-family:&quot;">服务器告诉浏览器,试图访问的对象已经被移到别的位置了,</span><br />

<span style="font-family:&quot;">到该头部指定的位置去取。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Location</span><span style="font-family:&quot;">:</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">http://i0.sinaimg.cn/dy/deco/2008/0528/sinahome_0803_ws_005_text_0.gif</span> 

</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">17.&nbsp;Pramga</span><span style="font-family:&quot;">:主要使用&nbsp;</span><span style="font-family:&quot;">Pramga:&nbsp;no-cache</span><span style="font-family:&quot;">,相当于&nbsp;</span><span style="font-family:&quot;">Cache-Control</span><span style="font-family:&quot;">:&nbsp;</span><span style="font-family:&quot;">no-cache</span><span style="font-family:&quot;">。</span><br />

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Pragma</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">no-cache</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">18.&nbsp;Proxy-Authenticate</span><span style="font-family:&quot;">:&nbsp;代理服务器响应浏览器,要求其提供代理身份验证信息。</span><br />

<span style="font-family:Microsoft YaHei;"> Proxy-Authorization</span><span style="font-family:&quot;">:浏览器响应代理服务器的身份验证请求,提供自己的身份信息。</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">19.&nbsp;Range</span><span style="font-family:&quot;">:浏览器(比如&nbsp;</span><span style="font-family:&quot;">Flashget&nbsp;</span><span style="font-family:&quot;">多线程下载时)告诉&nbsp;</span><span style="font-family:&quot;">WEB&nbsp;</span><span style="font-family:&quot;">服务器自己想取对象的哪部分。</span><br />

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Range: bytes=1173546-</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">20.&nbsp;Referer</span><span style="font-family:&quot;">:浏览器向&nbsp;</span><span style="font-family:&quot;">WEB&nbsp;</span><span style="font-family:&quot;">服务器表明自己是从哪个&nbsp;网页</span><span style="font-family:&quot;">/URL&nbsp;</span><span style="font-family:&quot;">获得</span><span style="font-family:&quot;">/</span><span style="font-family:&quot;">点击&nbsp;当前请求中的网址</span><span style="font-family:&quot;">/URL</span><span style="font-family:&quot;">。</span><br />

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Referer</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">http://www.sina.com/<;/span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">21.&nbsp;Server:&nbsp;WEB&nbsp;</span><span style="font-family:&quot;">服务器表明自己是什么软件及版本等信息。</span><br />

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Server</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Apache/2.0.61 (Unix)</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">22.&nbsp;User-Agent:&nbsp;</span><span style="font-family:&quot;">浏览器表明自己的身份(是哪种浏览器)。</span><br />

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">User-Agent</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN;   </span>

<span style="font-family:Microsoft YaHei;"> rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">23.&nbsp;Transfer-Encoding:&nbsp;WEB&nbsp;</span><span style="font-family:&quot;">服务器表明自己对本响应消息体(不是消息体里面的对象)</span><br />

<span style="font-family:&quot;">作了怎样的编码,比如是否分块(</span><span style="font-family:&quot;">chunked</span><span style="font-family:&quot;">)。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Transfer-Encoding: chunked</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">24.&nbsp;Vary:&nbsp;WEB</span><span style="font-family:&quot;">服务器用该头部的内容告诉&nbsp;</span><span style="font-family:&quot;">Cache&nbsp;</span><span style="font-family:&quot;">服务器,在什么条件下才能用本响应</span><br />

<span style="font-family:&quot;">所返回的对象响应后续的请求。</span>

<span style="font-family:&quot;">假如源</span><span style="font-family:&quot;">WEB</span><span style="font-family:&quot;">服务器在接到第一个请求消息时,其响应消息的头部为:</span>

<span style="font-family:Microsoft YaHei;"> Content-Encoding: gzip; Vary: Content-Encoding  </span><span style="font-family:&quot;">那么 </span><span style="font-family:&quot;">Cache </span><span style="font-family:&quot;">服务器会分析后续</span>

<span style="font-family:&quot;">请求消息的头部,检查其 </span><span style="font-family:&quot;">Accept-Encoding</span><span style="font-family:&quot;">,是否跟先前响应的 </span><span style="font-family:&quot;">Vary </span><span style="font-family:&quot;">头部值</span>

<span style="font-family:&quot;">一致,即是否使用相同的内容编码方法,这样就可以防止 </span><span style="font-family:&quot;">Cache </span><span style="font-family:&quot;">服务器用自己</span>

<span style="font-family:Microsoft YaHei;"> Cache </span><span style="font-family:&quot;">里面压缩后的实体响应给不具备解压能力的浏览器。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Vary</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Accept-Encoding</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">25.&nbsp;Via</span><span style="font-family:&quot;">:&nbsp;列出从客户端到&nbsp;</span><span style="font-family:&quot;">OCS&nbsp;</span><span style="font-family:&quot;">或者相反方向的响应经过了哪些代理服务器,他们用</span><br />

<span style="font-family:&quot;">什么协议(和版本)发送的请求。</span>

<span style="font-family:&quot;">当客户端请求到达第一个代理服务器时,该服务器会在自己发出的请求里面</span>

<span style="font-family:&quot;">添加 </span><span style="font-family:&quot;">Via </span><span style="font-family:&quot;">头部,并填上自己的相关信息,当下一个代理服务器 收到第一个代理</span>

<span style="font-family:&quot;">服务器的请求时,会在自己发出的请求里面复制前一个代理服务器的请求的</span><span style="font-family:&quot;">Via </span>

<span style="font-family:&quot;">头部,并把自己的相关信息加到后面, 以此类推,当 </span><span style="font-family:&quot;">OCS </span><span style="font-family:&quot;">收到最后一个代理服</span>

<span style="font-family:&quot;">务器的请求时,检查 </span><span style="font-family:&quot;">Via </span><span style="font-family:&quot;">头部,就知道该请求所经过的路由。</span>

<span style="font-family:&quot;">例如:</span><span style="font-family:&quot;">Via</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">1.0 236-81.D07071953.sina.com.cn:80 (squid/2.6.STABLE13)</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">====================================</span><br />

<span style="font-family:Microsoft YaHei;"> HTTP </span><span style="font-family:&quot;">请求消息头部实例:</span>

<span style="font-family:Microsoft YaHei;"> Host</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">rss.sina.com.cn</span>

<span style="font-family:Microsoft YaHei;"> User-Agent</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14</span>

<span style="font-family:Microsoft YaHei;"> Accept</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5</span>

<span style="font-family:Microsoft YaHei;"> Accept-Language</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">zh-cn,zh;q=0.5</span>

<span style="font-family:Microsoft YaHei;"> Accept-Encoding</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">gzip,deflate</span>

<span style="font-family:Microsoft YaHei;"> Accept-Charset</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">gb2312,utf-8;q=0.7,*;q=0.7</span>

<span style="font-family:Microsoft YaHei;"> Keep-Alive</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">300</span>

<span style="font-family:Microsoft YaHei;"> Connection</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">keep-alive</span>

<span style="font-family:Microsoft YaHei;"> Cookie</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">userId=C5bYpXrimdmsiQmsBPnE1Vn8ZQmdWSm3WRlEB3vRwTnRtW   <– Cookie </span>

<span style="font-family:Microsoft YaHei;"> If-Modified-Since</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Sun, 01 Jun 2008 12:05:30 GMT</span>

<span style="font-family:Microsoft YaHei;"> Cache-Control</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">max-age=0</span>

<span style="font-family:Microsoft YaHei;"> HTTP </span><span style="font-family:&quot;">响应消息头部实例:</span>

<span style="font-family:Microsoft YaHei;"> Status</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">OK - 200                                                <– </span><span style="font-family:&quot;">响应状态码,表示 </span><span style="font-family:&quot;">web </span><span style="font-family:&quot;">服务器处理的结果。 </span>

<span style="font-family:Microsoft YaHei;"> Date</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Sun, 01 Jun 2008 12:35:47 GMT</span>

<span style="font-family:Microsoft YaHei;"> Server</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Apache/2.0.61 (Unix)</span>

<span style="font-family:Microsoft YaHei;"> Last-Modified</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Sun, 01 Jun 2008 12:35:30 GMT</span>

<span style="font-family:Microsoft YaHei;"> Accept-Ranges</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">bytes</span>

<span style="font-family:Microsoft YaHei;"> Content-Length</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">18616</span>

<span style="font-family:Microsoft YaHei;"> Cache-Control</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">max-age=120</span>

<span style="font-family:Microsoft YaHei;"> Expires</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">Sun, 01 Jun 2008 12:37:47 GMT</span>

<span style="font-family:Microsoft YaHei;"> Content-Type</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">application/xml</span>

<span style="font-family:Microsoft YaHei;"> Age</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">2</span>

<span style="font-family:Microsoft YaHei;"> X-Cache</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">HIT from 236-41.D07071951.sina.com.cn                  <– </span><span style="font-family:&quot;">反向代理服务器使用的 </span><span style="font-family:&quot;">HTTP </span><span style="font-family:&quot;">头部</span>

<span style="font-family:Microsoft YaHei;"> Via</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">1.0 236-41.D07071951.sina.com.cn:80 (squid/2.6.STABLE13)</span>

<span style="font-family:Microsoft YaHei;"> Connection</span><span style="font-family:&quot;">:</span><span style="font-family:&quot;">close</span>

<span style="font-family:Microsoft YaHei;"> =====================================</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">HTTP</span><span style="font-family:&quot;">头部信息简单说明</span><br />

<span style="font-family:Microsoft YaHei;"> 2008-02-28 03:13</span>

<span style="font-family:Microsoft YaHei;"> 一、</span><span style="font-family:&quot;">HTTP</span><span style="font-family:&quot;">响应码响应码由三位十进制数字组成,它们出现在由</span><span style="font-family:&quot;">HTTP</span><span style="font-family:&quot;">服务器发送的响应的第一行。</span>

<span style="font-family:Microsoft YaHei;"> 响应码分五种类型,由它们的第一位数字表示:</span>

<span style="font-family:Microsoft YaHei;"> 1xx</span><span style="font-family:&quot;">:信息,请求收到,继续处理</span>

<span style="font-family:Microsoft YaHei;"> 2xx</span><span style="font-family:&quot;">:成功,行为被成功地接受、理解和采纳</span>

<span style="font-family:Microsoft YaHei;"> 3xx</span><span style="font-family:&quot;">:重定向,为了完成请求,必须进一步执行的动作</span>

<span style="font-family:Microsoft YaHei;"> 4xx</span><span style="font-family:&quot;">:客户端错误,请求包含语法错误或者请求无法实现</span>

<span style="font-family:Microsoft YaHei;"> 5xx</span><span style="font-family:&quot;">:服务器错误,服务器不能实现一种明显无效的请求</span>

<span style="font-family:Microsoft YaHei;"> 下表显示每个响应码及其含义:</span>

<span style="font-family:Microsoft YaHei;"> 100 </span><span style="font-family:&quot;">继续</span><span style="font-family:&quot;">101 </span><span style="font-family:&quot;">分组交换协</span><span style="font-family:&quot;">200 OK201 </span><span style="font-family:&quot;">被创建</span><span style="font-family:&quot;">202 </span><span style="font-family:&quot;">被采纳</span><span style="font-family:&quot;">203 </span><span style="font-family:&quot;">非授权信息</span><span style="font-family:&quot;">204 </span><span style="font-family:&quot;">无内容</span><span style="font-family:&quot;">205 </span><span style="font-family:&quot;">重置内容</span><span style="font-family:&quot;">206 </span><span style="font-family:&quot;">部分内容</span><span style="font-family:&quot;">300 </span><span style="font-family:&quot;">多选项</span><span style="font-family:&quot;">301 </span><span style="font-family:&quot;">永久地传送</span><span style="font-family:&quot;">302 </span><span style="font-family:&quot;">找到</span><span style="font-family:&quot;">303 </span><span style="font-family:&quot;">参见其他</span><span style="font-family:&quot;">304 </span><span style="font-family:&quot;">未改动</span><span style="font-family:&quot;">305 </span><span style="font-family:&quot;">使用代理</span><span style="font-family:&quot;">307 </span><span style="font-family:&quot;">暂时重定向</span><span style="font-family:&quot;">400 </span><span style="font-family:&quot;">错误请求</span><span style="font-family:&quot;">401 </span><span style="font-family:&quot;">未授权</span><span style="font-family:&quot;">402 </span><span style="font-family:&quot;">要求付费</span><span style="font-family:&quot;">403 </span><span style="font-family:&quot;">禁止</span><span style="font-family:&quot;">404 </span><span style="font-family:&quot;">未找到</span><span style="font-family:&quot;">405 </span><span style="font-family:&quot;">不允许的方法</span><span style="font-family:&quot;">406 </span><span style="font-family:&quot;">不被采纳</span><span style="font-family:&quot;">407 </span><span style="font-family:&quot;">要求代理授权</span><span style="font-family:&quot;">408 </span><span style="font-family:&quot;">请求超时</span><span style="font-family:&quot;">409 </span><span style="font-family:&quot;">冲突</span><span style="font-family:&quot;">410 </span><span style="font-family:&quot;">过期的</span><span style="font-family:&quot;">411 </span><span style="font-family:&quot;">要求的长度</span><span style="font-family:&quot;">412 </span><span style="font-family:&quot;">前提不成立</span><span style="font-family:&quot;">413 </span><span style="font-family:&quot;">请求实例太大</span><span style="font-family:&quot;">414 </span><span style="font-family:&quot;">请求</span><span style="font-family:&quot;">URI</span><span style="font-family:&quot;">太大</span><span style="font-family:&quot;">415 </span><span style="font-family:&quot;">不支持的媒体类型</span><span style="font-family:&quot;">416 </span><span style="font-family:&quot;">无法满足的请求范围</span><span style="font-family:&quot;">417 </span><span style="font-family:&quot;">失败的预期</span><span style="font-family:&quot;">500 </span><span style="font-family:&quot;">内部服务器错误</span><span style="font-family:&quot;">501 </span><span style="font-family:&quot;">未被使用</span><span style="font-family:&quot;">502 </span><span style="font-family:&quot;">网关错误</span><span style="font-family:&quot;">503 </span><span style="font-family:&quot;">不可用的服务</span><span style="font-family:&quot;">504 </span><span style="font-family:&quot;">网关超时</span><span style="font-family:&quot;">505 HTTP</span><span style="font-family:&quot;">版本未被支持</span>

<span style="font-family:Microsoft YaHei;"> 二、</span><span style="font-family:&quot;">HTTP</span><span style="font-family:&quot;">头标头标由主键</span><span style="font-family:&quot;">/</span><span style="font-family:&quot;">值对组成。它们描述客户端或者服务器的属性、被传输的资源以及应该实现连接。</span>

<span style="font-family:Microsoft YaHei;"> 四种不同类型的头标:</span>

<span style="font-family:Microsoft YaHei;"> 1.</span><span style="font-family:&quot;">通用头标:即可用于请求,也可用于响应,是作为一个整体而不是特定资源与事务相关联。</span>

<span style="font-family:Microsoft YaHei;"> 2.</span><span style="font-family:&quot;">请求头标:允许客户端传递关于自身的信息和希望的响应形式。</span>

<span style="font-family:Microsoft YaHei;"> 3.</span><span style="font-family:&quot;">响应头标:服务器和于传递自身信息的响应。</span>

<span style="font-family:Microsoft YaHei;"> 4.</span><span style="font-family:&quot;">实体头标:定义被传送资源的信息。即可用于请求,也可用于响应。</span>

<span style="font-family:Microsoft YaHei;"> 头标格式:</span><span style="font-family:&quot;"><name>:<value><CRLF></span>

<span style="font-family:Microsoft YaHei;"> 下表描述在</span><span style="font-family:&quot;">HTTP/1.1</span><span style="font-family:&quot;">中用到的头标</span>

<span style="font-family:Microsoft YaHei;"> Accept </span><span style="font-family:&quot;">定义客户端可以处理的媒体类型,按优先级排序;在一个以逗号为分隔的列表中,可以定义多种类型和使用通配符。例如:</span><span style="font-family:&quot;">Accept: image/jpeg,image/png,/Accept-Charset </span><span style="font-family:&quot;">定义客户端可以处理的字符集,按优先级排序;在一个以逗号为分隔的列表中,可以定义多种类型和使用通配符。例如:</span><span style="font-family:&quot;">Accept-Charset: iso-8859-1,*,utf-8</span>

<span style="font-family:Microsoft YaHei;"> Accept-Encoding </span><span style="font-family:&quot;">定义客户端可以理解的编码机制。例如:</span><span style="font-family:&quot;">Accept-Encoding:gzip,compress</span>

<span style="font-family:Microsoft YaHei;"> Accept-Language </span><span style="font-family:&quot;">定义客户端乐于接受的自然语言列表。例如:</span><span style="font-family:&quot;">Accept-Language: en,de</span>

<span style="font-family:Microsoft YaHei;"> Accept-Ranges </span><span style="font-family:&quot;">一个响应头标,它允许服务器指明:将在给定的偏移和长度处,为资源组成部分的接受请求。该头标的值被理解为请求范围的度量单位。例如</span><span style="font-family:&quot;">Accept-Ranges: bytes</span><span style="font-family:&quot;">或</span><span style="font-family:&quot;">Accept-Ranges: none</span>

<span style="font-family:Microsoft YaHei;"> Age </span><span style="font-family:&quot;">允许服务器规定自服务器生成该响应以来所经过的时间长度,以秒为单位。该头标主要用于缓存响应。例如:</span><span style="font-family:&quot;">Age: 30</span>

<span style="font-family:Microsoft YaHei;"> Allow </span><span style="font-family:&quot;">一个响应头标,它定义一个由位于请求</span><span style="font-family:&quot;">URI</span><span style="font-family:&quot;">中的次源所支持的</span><span style="font-family:&quot;">HTTP</span><span style="font-family:&quot;">方法列表。例如:</span><span style="font-family:&quot;">Allow: GET,PUT</span>

<span style="font-family:Microsoft YaHei;"> aUTHORIZATION </span><span style="font-family:&quot;">一个响应头标,用于定义访问一种资源所必需的授权(域和被编码的用户</span><span style="font-family:&quot;">ID</span><span style="font-family:&quot;">与口令)。例如:</span><span style="font-family:&quot;">Authorization: Basic YXV0aG9yOnBoaWw=</span>

<span style="font-family:Microsoft YaHei;"> Cache-Control </span><span style="font-family:&quot;">一个用于定义缓存指令的通用头标。例如:</span><span style="font-family:&quot;">Cache-Control: max-age=30</span>

<span style="font-family:Microsoft YaHei;"> Connection </span><span style="font-family:&quot;">一个用于表明是否保存</span><span style="font-family:&quot;">socket</span><span style="font-family:&quot;">连接为开放的通用头标。例如:</span><span style="font-family:&quot;">Connection: close</span><span style="font-family:&quot;">或</span><span style="font-family:&quot;">Connection: keep-alive</span>

<span style="font-family:Microsoft YaHei;"> Content-Base </span><span style="font-family:&quot;">一种定义基本</span><span style="font-family:&quot;">URI</span><span style="font-family:&quot;">的实体头标,为了在实体范围内解析相对</span><span style="font-family:&quot;">URLs</span><span style="font-family:&quot;">。如果没有定义</span><span style="font-family:&quot;">Content-Base</span><span style="font-family:&quot;">头标解析相对</span><span style="font-family:&quot;">URLs</span><span style="font-family:&quot;">,使用</span><span style="font-family:&quot;">Content- Location URI</span><span style="font-family:&quot;">(存在且绝对)或使用</span><span style="font-family:&quot;">URI</span><span style="font-family:&quot;">请求。例如:</span><span style="font-family:&quot;">Content-Base: </span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">http://www.myweb.com</span> 

</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<span style="font-family:Microsoft YaHei;">Content-Encoding&nbsp;</span><span style="font-family:&quot;">一种介质类型修饰符,标明一个实体是如何编码的。例如:</span><span style="font-family:&quot;">Content-Encoding:&nbsp;zipContent-Language&nbsp;</span><span style="font-family:&quot;">用于指定在输入流中数据的自然语言类型。例如:</span><span style="font-family:&quot;">Content-Language:&nbsp;en</span><br />

<span style="font-family:Microsoft YaHei;"> Content-Length </span><span style="font-family:&quot;">指定包含于请求或响应中数据的字节长度。例如:</span><span style="font-family:&quot;">Content-Length:382</span>

<span style="font-family:Microsoft YaHei;"> Content-Location </span><span style="font-family:&quot;">指定包含于请求或响应中的资源定位(</span><span style="font-family:&quot;">URI</span><span style="font-family:&quot;">)。如果是一绝。对</span><span style="font-family:&quot;">URL</span><span style="font-family:&quot;">它也作为被解析实体的相对</span><span style="font-family:&quot;">URL</span><span style="font-family:&quot;">的出发点。例如:</span><span style="font-family:&quot;">Content-Location: http://www.myweb.com/news<;/span>

<span style="font-family:Microsoft YaHei;"> Content-MD5 </span><span style="font-family:&quot;">实体的一种</span><span style="font-family:&quot;">MD5</span><span style="font-family:&quot;">摘要,用作校验和。发送方和接受方都计算</span><span style="font-family:&quot;">MD5</span><span style="font-family:&quot;">摘要,接受方将其计算的值与此头标中传递的值进行比较。例如:</span><span style="font-family:&quot;">Content-MD5: <base64 of 128 MD5 digest></span>

<span style="font-family:Microsoft YaHei;"> Content-Range </span><span style="font-family:&quot;">随部分实体一同发送;标明被插入字节的低位与高位字节偏移,也标明此实体的总长度。例如:</span><span style="font-family:&quot;">Content-Range: 1001-2000/5000</span>

<span style="font-family:Microsoft YaHei;"> Contern-Type </span><span style="font-family:&quot;">标明发送或者接收的实体的</span><span style="font-family:&quot;">MIME</span><span style="font-family:&quot;">类型。例如:</span><span style="font-family:&quot;">Content-Type: text/html</span>

<span style="font-family:Microsoft YaHei;"> Date </span><span style="font-family:&quot;">发送</span><span style="font-family:&quot;">HTTP</span><span style="font-family:&quot;">消息的日期。例如:</span><span style="font-family:&quot;">Date: Mon,10PR 18:42:51 GMT</span>

<span style="font-family:Microsoft YaHei;"> ETag </span><span style="font-family:&quot;">一种实体头标,它向被发送的资源分派一个唯一的标识符。对于可以使用多种</span><span style="font-family:&quot;">URL</span><span style="font-family:&quot;">请求的资源,</span><span style="font-family:&quot;">ETag</span><span style="font-family:&quot;">可以用于确定实际被发送的资源是否为同一资源。例如:</span><span style="font-family:&quot;">ETag: ’208f-419e-30f8dc99′</span>

<span style="font-family:Microsoft YaHei;"> Expires </span><span style="font-family:&quot;">指定实体的有效期。例如:</span><span style="font-family:&quot;">Expires: Mon,05 Dec 2008 12:00:00 GMT</span>

<span style="font-family:Microsoft YaHei;"> Form </span><span style="font-family:&quot;">一种请求头标,给定控制用户代理的人工用户的电子邮件地址。例如:</span><span style="font-family:&quot;">From: webmaster@myweb.com</span>

<span style="font-family:Microsoft YaHei;"> Host </span><span style="font-family:&quot;">被请求资源的主机名。对于使用</span><span style="font-family:&quot;">HTTP/1.1</span><span style="font-family:&quot;">的请求而言,此域是强制性的。例如:</span><span style="font-family:&quot;">Host: www.myweb.com</span>

<span style="font-family:Microsoft YaHei;"> If-Modified-Since </span><span style="font-family:&quot;">如果包含了</span><span style="font-family:&quot;">GET</span><span style="font-family:&quot;">请求,导致该请求条件性地依赖于资源上次修改日期。如果出现了此头标,并且自指定日期以来,此资源已被修改,应该反回一个</span><span style="font-family:&quot;">304</span><span style="font-family:&quot;">响应代码。例如:</span><span style="font-family:&quot;">If-Modified-Since: Mon,10PR 18:42:51 GMT</span>

<span style="font-family:Microsoft YaHei;"> If-Match </span><span style="font-family:&quot;">如果包含于一个请求,指定一个或者多个实体标记。只发送其</span><span style="font-family:&quot;">ETag</span><span style="font-family:&quot;">与列表中标记区配的资源。例如:</span><span style="font-family:&quot;">If-Match: ’208f-419e-308dc99′</span>

<span style="font-family:Microsoft YaHei;"> If-None-Match </span><span style="font-family:&quot;">如果包含一个请求,指定一个或者多个实体标记。资源的</span><span style="font-family:&quot;">ETag</span><span style="font-family:&quot;">不与列表中的任何一个条件匹配,操作才执行。例如:</span><span style="font-family:&quot;">If-None-Match: ’208f-419e-308dc99′</span>

<span style="font-family:Microsoft YaHei;"> If-Range </span><span style="font-family:&quot;">指定资源的一个实体标记,客户端已经拥有此资源的一个拷贝。必须与</span><span style="font-family:&quot;">Range</span><span style="font-family:&quot;">头标一同使用。如果此实体自上次被客户端检索以来,还不曾修改过,那么服务器只发送指定的范围,否则它将发送整个资源。例如:</span><span style="font-family:&quot;">Range: byte=0-499<CRLF>If-Range:’208f-419e-30f8dc99′</span>

<span style="font-family:Microsoft YaHei;"> If-Unmodified-Since </span><span style="font-family:&quot;">只有自指定的日期以来,被请求的实体还不曾被修改过,才会返回此实体。例如:</span><span style="font-family:&quot;">If-Unmodified-Since:Mon,10PR 18:42:51 GMT</span>

<span style="font-family:Microsoft YaHei;"> Last-Modified </span><span style="font-family:&quot;">指定被请求资源上次被修改的日期和时间。例如:</span><span style="font-family:&quot;">Last-Modified: Mon,10PR 18:42:51 GMT</span>

<span style="font-family:Microsoft YaHei;"> Location </span><span style="font-family:&quot;">对于一个已经移动的资源,用于重定向请求者至另一个位置。与状态编码</span><span style="font-family:&quot;">302</span><span style="font-family:&quot;">(暂时移动)或者</span><span style="font-family:&quot;">301</span><span style="font-family:&quot;">(永久性移动)配合使用。例如:</span><span style="font-family:&quot;">Location: http://www2.myweb.com/index.jsp<;/span>

<span style="font-family:Microsoft YaHei;"> Max-Forwards </span><span style="font-family:&quot;">一个用于</span><span style="font-family:&quot;">TRACE</span><span style="font-family:&quot;">方法的请求头标,以指定代理或网关的最大数目,该请求通过网关才得以路由。在通过请求传递之前,代理或网关应该减少此数目。例如:</span><span style="font-family:&quot;">Max-Forwards: 3</span>

<span style="font-family:Microsoft YaHei;"> Pragma </span><span style="font-family:&quot;">一个通用头标,它发送实现相关的信息。例如:</span><span style="font-family:&quot;">Pragma: no-cache</span>

<span style="font-family:Microsoft YaHei;"> Proxy-Authenticate </span><span style="font-family:&quot;">类似于</span><span style="font-family:&quot;">WWW-Authenticate</span><span style="font-family:&quot;">,便是有意请求只来自请求链(代理)的下一个服务器的认证。例如:</span><span style="font-family:&quot;">Proxy-Authenticate: Basic realm-admin</span>

<span style="font-family:Microsoft YaHei;"> Proxy-Proxy-Authorization </span><span style="font-family:&quot;">类似于授权,但并非有意传递任何比在即时服务器链中更进一步的内容。例如:</span><span style="font-family:&quot;">Proxy-Proxy-Authorization: Basic YXV0aG9yOnBoaWw=</span>

<span style="font-family:Microsoft YaHei;"> Public </span><span style="font-family:&quot;">列表显示服务器所支持的方法集。例如:</span><span style="font-family:&quot;">Public: OPTIONS,MGET,MHEAD,GET,HEAD</span>

<span style="font-family:Microsoft YaHei;"> Range </span><span style="font-family:&quot;">指定一种度量单位和一个部分被请求资源的偏移范围。例如:</span><span style="font-family:&quot;">Range: bytes=206-5513</span>

<span style="font-family:Microsoft YaHei;"> Refener </span><span style="font-family:&quot;">一种请求头标域,标明产生请求的初始资源。对于</span><span style="font-family:&quot;">HTML</span><span style="font-family:&quot;">表单,它包含此表单的</span><span style="font-family:&quot;">Web</span><span style="font-family:&quot;">页面的地址。例如:</span><span style="font-family:&quot;">Refener: http://www.myweb.com/news/search.html<;/span>

<span style="font-family:Microsoft YaHei;"> Retry-After </span><span style="font-family:&quot;">一种响应头标域,由服务器与状态编码</span><span style="font-family:&quot;">503</span><span style="font-family:&quot;">(无法提供服务)配合发送,以标明再次请求之前应该等待多长时间。此时间即可以是一种日期,也可以是一种秒单位。例如:</span><span style="font-family:&quot;">Retry-After: 18</span>

<span style="font-family:Microsoft YaHei;"> Server </span><span style="font-family:&quot;">一种标明</span><span style="font-family:&quot;">Web</span><span style="font-family:&quot;">服务器软件及其版本号的头标。例如:</span><span style="font-family:&quot;">Server: Apache/2.0.46(Win32)</span>

<span style="font-family:Microsoft YaHei;"> Transfer-Encoding </span><span style="font-family:&quot;">一种通用头标,标明对应被接受方反向的消息体实施变换的类型。例如:</span><span style="font-family:&quot;">Transfer-Encoding: chunked</span>

<span style="font-family:Microsoft YaHei;"> Upgrade </span><span style="font-family:&quot;">允许服务器指定一种新的协议或者新的协议版本,与响应编码</span><span style="font-family:&quot;">101</span><span style="font-family:&quot;">(切换协议)配合使用。例如:</span><span style="font-family:&quot;">Upgrade: HTTP/2.0</span>

<span style="font-family:Microsoft YaHei;"> User-Agent </span><span style="font-family:&quot;">定义用于产生请求的软件类型(典型的如</span><span style="font-family:&quot;">Web</span><span style="font-family:&quot;">浏览器)。例如:</span><span style="font-family:&quot;">User-Agent: Mozilla/4.0(compatible; MSIE 5.5; Windows NT; DigExt)</span>

<span style="font-family:Microsoft YaHei;"> Vary </span><span style="font-family:&quot;">一个响应头标,用于表示使用服务器驱动的协商从可用的响应表示中选择响应实体。例如:</span><span style="font-family:&quot;">Vary: *Via </span><span style="font-family:&quot;">一个包含所有中间主机和协议的通用头标,用于满足请求。例如:</span><span style="font-family:&quot;">Via: 1.0 fred.com, 1.1 wilma.com</span>

<span style="font-family:Microsoft YaHei;"> Warning </span><span style="font-family:&quot;">用于提供关于响应状态补充信息的响应头标。例如:</span><span style="font-family:&quot;">Warning: 99 www.myweb.com Piano needs tuning</span>

<span style="font-family:Microsoft YaHei;"> www-Authenticate </span><span style="font-family:&quot;">一个提示用户代理提供用户名和口令的响应头标,与状态编码</span><span style="font-family:&quot;">401</span><span style="font-family:&quot;">(未授权)配合使用。响应一个授权头标。例如:</span><span style="font-family:&quot;">www-Authenticate: Basic realm=zxm.mgmt</span>
</p>
<p style="color:#555555;font-family:&quot;font-size:15px;text-indent:30px;">

<br />

</p>

Last modification:December 13th, 2017 at 11:43 pm