【正文】
ord MUST be supplied within a Connection header field section whenever TE is present in an HTTP/ message. A server tests whether a transfercoding is acceptable, according to a TE field, using these rules: 1. The chunked transfercoding is always acceptable. If the keyword trailers is listed, the client indicates that it is willing to accept trailer fields in the chunked response on behalf of itself and any downstream clients. The implication is that, if given, the client is stating that either all downstream clients are willing to accept trailer fields in the forwarded response, or that it will attempt to buffer the response on behalf of downstream recipients. Note: HTTP/ does not define any means to limit the size of a chunked response such that a client can be assured of buffering the entire response. 2. If the transfercoding being tested is one of the transfercodings listed in the TE field, then it is acceptable unless it is acpanied by a qvalue of 0. As defined in section , a qvalue of 0 means not acceptable. 3. If multiple transfercodings are acceptable, then the acceptable transfercoding with the highest nonzero qvalue is preferred. The chunked transfercoding always has a qvalue of 1. If the TE fieldvalue is empty or if no TE field is present, the only transfercoding is chunked. A message with no transfercoding is always acceptable. Trailer The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfercoding. Trailer Trailer : 1fieldname An HTTP/ message SHOULD include a Trailer header field in a message using chunked transfercoding with a nonempty trailer. Doing so allows the recipient to know which header fields to expect in the trailer. If no Trailer header field is present, the trailer SHOULD NOT include any header fields. See section for restrictions on the use of trailer fields in a chunked transfercoding. Message header fields listed in the Trailer header field MUST NOT include the following header fields: . TransferEncoding . ContentLength . Trailer 附錄 B 超文本傳輸協(xié)議―― HTTP/ Referer Referer[sic] requestheader 域允許客戶端指定,為服務器的利益,資源的地址 ( URI),從中獲取 RequestURI(“ referrer”,盡管頭部域拼寫錯誤。)Referer requestheader 允許服務 器為感興趣的資源、日志、優(yōu)化緩存、等生成向后鏈接清單。它還允許廢棄或維護跟蹤打錯鏈接。 Referer 域【禁止】被發(fā)送,若 RequestURI 從沒有其自己 URI 的源獲取,如用戶鍵盤的輸入。 Referer Referer : absoluteURI | relativeURI 例子: Referer: 若域值是相對 URI,它【應該】被解釋為與 RequestURI 相對。該 URI 【禁止】包括分片。安全考 節(jié)。 RetryAfter RetryAfter responsehedaer 域能夠與 503 ( Service Unavailable)響應一起用于指出希望該服務對請求客戶端可以維持有效多長。該域還【可以】與3xx()響應一起用于指出要求用戶代理在重定向請求前應等待的最小時間。該域的值可以是響應時刻后的 HTTPdate 或整數(shù) 數(shù) (十進 制)。 RetryAfter RetryAfter : HTTPdate | deltaseconds 其用法的 2 個例子是 RetryAfter: Fri, 31 Dec 1999 23:59:59 GMT RetryAfter: 120 在后個例子中,延遲是 2 分鐘。 Server Server responseheader 域包含原始服務器處理請求所使用的軟件的信息。該域能夠包含多個 product 符號 ( 節(jié))和 ment,以標識 服務器和任何重要的子產(chǎn)品。 product 符號按標識該應用程序的重要性順序列出。 Server Server : 1* product | ment 例子: Server: CERN/ lib/ 若 響 應 通 過 代 理 轉(zhuǎn) 發(fā) , 則 代 理 應 用 程 序 【 禁 止 】 修 改 Server responseheader。取而代之,它【應該】包括 Via 域 (如 節(jié)所述)。 注意:啟示服務器的特定軟件版本可能允許服務器主機更易受到攻擊,因已知該軟件包含安全漏洞。鼓勵服務器實現(xiàn)者將該域作 為可配置選項。 TE TE requestheader 域 指 出 愿 意 在 響 應 中 接 受 任 何 擴 展transfercoding,且是否愿意接受 chunked transfercoding 中的尾巴域。其值可能由關鍵字“ trailers”和 /或逗號分隔的有可選接受參數(shù) (如 節(jié)所述)的擴展 transfercoding 名的清單。 TE TE : tcodings tcodings trailers | transferextension [ acceptparams ] 存在關鍵字“ trailers”指出該客戶端愿意接受尾巴域于 chunked transfercoding 中, 節(jié)所述。該關鍵字保 給 transfercoding 值使用,即使它自己不表示任何 transfercoding。 其用法的例子是: TE: deflate TE: TE: trailers, deflate。q TE 頭部域只應用到中間連接。因此該關鍵字【必須】在 Connection 頭部域 ( 節(jié))中提供,無論何時 TE 在 HTTP/ 消息中存在時。 服務器按照 TE 域測試某個 transfercoding 是否可接受,使用如下規(guī)則: “ chunked” transfercoding 始終可接受。若關鍵字“ trailers”列出,則客戶端指出它愿意接受尾巴域于 chunked 響應中,按其自己和任何下游客戶端的行為。這意味著,若給出,客戶端聲明全部下游客戶端中的任何一個都愿意接受尾巴域于轉(zhuǎn)發(fā)的響應中,或它愿意嘗試以下游接收方的行為緩存響應。 注意: HTTP/ 沒有定義限制 chunked 響應的大小的任何意思,因此,客戶端能夠確保緩存整個響應。 若正測試的 transfercoding 是 TE 域中所列出的 transfercoding 中的一個,這時它是可接受的,除非它伴隨的 qvalue 為 0。(如 節(jié)所定義,qvalue 為 0 意味著“不可接受”。) 3 、若多個 transfercoding 都可接受,這時選擇有最大非零 qvalue 的可接受的 transfercoding?!?chunked” transfercoding 始終有 qvalue 為 1。 若 TE 域值為空,或若 TE 域不存在,則唯 一 transfercoding 是“ chunked”。無 transfercoding 的消息始終是可接受的。 Trailer Trailer 通用域值指出給出的頭部域集合在以 chunked transfercoding 編碼的消息的尾巴中存在。 Trailer Trailer : 1fieldname HTTP/ 消息【應該】包括 Trailer 頭部域在使用 chunked transfercoding 且有非空尾巴的消息中。這樣做將允許接收方知道在尾巴中希望 有哪些頭部域。 若不存在 Trailer 頭部域,則該尾巴 【不該】包括任何頭部域。關于在“ chunked” transfercoding 中使用尾巴域的 節(jié)。 在 Trailer 頭部域中列出的消息頭部域【禁止】包括如下頭部域: ??TransferEncoding ??ContentLength ??Trailer 訪客 消息 用戶組 網(wǎng)站 通過瀏覽器瀏覽 網(wǎng)站 原始服務器 圖片 Request 用戶代理 權限 瀏覽器 間接訪問引用圖片 和 JS 腳本 訪客 用戶 統(tǒng)計服務器 JS 每數(shù)秒發(fā)送 Resquest 響應鏈接 原始服務器 用戶代理 簡單連接 原始服務器 用戶代理 請求鏈接