iT邦幫忙

2017 iT 邦幫忙鐵人賽
DAY 21
0
自我挑戰組

我的月薪嬌妻:HTTP系列 第 21

Day21-X開頭的header

  • 分享至 

  • xImage
  •  

為了區分標準(standardized)和非標準(unstandardized)的參數,在非標準參數加上前綴字(prefix): X-。代表實驗性質(eXperimental)或是擴充性質(eXtension)的意思。

但在2012發表的RFC6648不建議使用類似的結構。

觀察一下之前出現過的Response

HTTP/1.1 200 OK
Server: nginx
Date: Sun, 04 Dec 2016 15:21:12 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Cache-Control: max-age=0
Expires: Sun, 04 Dec 2016 15:21:12 GMT
Vary: Accept-Encoding,User-Agent
X-Whom: nginx01
X-Cache-Status: MISS
Content-Encoding: gzip

X-Whom: nginx01, X-Cache-Status: MISS

HTTP/1.1 200 OK
Date: Mon, 05 Dec 2016 15:31:42 GMT
Server: Apache
X-Powered-By: PHP/5.1.6
Set-Cookie: UserIP=123.195.210.16; expires=Tue, 05-Dec-2017 15:31:42 GMT
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
Content-Language: zh-TW

<META name="description" content="象印10人份微電腦電子鍋-NSZDF18 內容:日本原裝進口...(略)

X-Powered-By: PHP/5.1.6

HTTP/1.1 403 Forbidden
Cache-Control: private
Content-Length: 13
Content-Type: text/plain; charset=utf-8
Server: Microsoft-IIS/8.0
X-AspNetMvc-Version: 5.1
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Access-Control-Allow-Origin: *
Date: Thu, 08 Dec 2016 15:35:35 GMT

X-AspNetMvc-Version: 5.1, X-AspNet-Version: 4.0.30319, X-Powered-By: ASP.NET

Accept-Ranges:bytes
access-control-allow-origin:*
cache-control:max-age=604800, must-revalidate
Content-Length:57087
content-md5:u+kIpShjvaMl4ZZ749Qcww==
Content-Type:image/jpeg
Date:Fri, 09 Dec 2016 16:05:23 GMT
Last-Modified:Tue, 06 Dec 2016 09:19:04 GMT
Server:ECS (khh/0474)
surrogate-key:media media/bucket/0 media/806065915645153280
X-Cache:HIT
x-connection-hash:95a2eb0846ed3a2efb2c7e07f0c4f8fa
x-content-type-options:nosniff
x-response-time:17

X-Cache:HIT, x-connection-hash:95a2eb0846ed3a2efb2c7e07f0c4f8fa, x-content-type-options:nosniff, x-response-time:17


上一篇
Day20-內容要如何處置-Content-Disposition
下一篇
Day22-20% ? %20 ?-URLEncode-1
系列文
我的月薪嬌妻:HTTP30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言