Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. HTTP
  3. 参考
  4. HTTP 标头
  5. Trailer

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

Trailer

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Trailer 是一个响应首部,允许发送方在分块发送的消息后面添加额外的元信息,这些元信息可能是随着消息主体的发送动态生成的,比如消息的完整性校验,消息的数字签名,或者消息经过处理之后的最终状态等。

备注:请求首部TE 需要设置 trailers 来允许挂载字段。

Header typeResponse header
Forbidden header nameyes

语法

Trailer: header-names

指令

header-names

出现在分块信息挂载部分的消息首部。以下首部字段不允许出现:

示例

在分块传输编码中使用挂载(trailer)首部

在这个例子中,Expires 首部出现在分块信息的结尾,作为挂载(trailer)首部。

HTTP/1.1 200 OKContent-Type: text/plainTransfer-Encoding: chunkedTrailer: Expires7\r\nMozilla\r\n9\r\nDeveloper\r\n7\r\nNetwork\r\n0\r\nExpires: Wed, 21 Oct 2015 07:28:00 GMT\r\n\r\n

规范

Specification
HTTP Semantics
# field.trailer
HTTP/1.1
# chunked.trailer.section

浏览器兼容性

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp