©
This document uses PHP Chinese website manual Release
所述 trailers 响应头允许发送方包括为了提供可能,而所述消息体被发送,诸如消息完整性检查,数字签名,或后处理状态动态地生成的元数据在分块消息的末尾附加字段。
TE
请求头需要被设置为 “trailers”,允许 trailer。
Header type | Response header |
---|---|
Forbidden header name | yes |
Trailer: header-names
header-names
HTTP 头字段将出现在分块消息的尾部。这些标题字段是不允许的:
消息成帧头(例如Transfer-Encoding
和Content-Length
),
路由头(例如Host
),
请求改性剂(例如,控制和条件,比如Cache-Control
,Max-Forwards
或TE
),
验证标头(例如Authorization
或Set-Cookie
),
或者Content-Encoding
,Content-Type
,Content-Range
,和Trailer
本身。
在这个例子中,Expires
标题用在分块消息的末尾,并作为尾部标题。
HTTP/1.1 200 OK Content-Type: text/plain Transfer-Encoding: chunked Trailer: Expires7\r\n Mozilla\r\n 9\r\n Developer\r\n 7\r\n Network\r\n 0\r\n Expires: Wed, 21 Oct 2015 07:28:00 GMT\r\n \r\n
Specification | Title |
---|---|
RFC 7230, section 4.4: Trailer | Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing |
RFC 7230, section 4.1.2: Chunked trailer part | Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing |
Feature | Chrome | Firefox | Edge | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |