TE - HTTP 编辑

The TE request header specifies the transfer encodings the user agent is willing to accept. (you could informally call it Accept-Transfer-Encoding, which would be more intuitive).

In HTTP/2 - the TE header field is only accepted if the trailers value is set.

See also the Transfer-Encoding response header for more details on transfer encodings. Note that chunked is always acceptable for HTTP/1.1 recipients and you don't have to specify "chunked" using the TE header. However, it is useful for setting if the client is accepting trailer fields in a chunked transfer coding using the "trailers" value.

Header typeRequest header
Forbidden header nameyes

Syntax

TE: compress
TE: deflate
TE: gzip
TE: trailers

// Multiple directives, weighted with the quality value syntax:
TE: trailers, deflate;q=0.5

Directives

compress
A format using the Lempel-Ziv-Welch (LZW) algorithm is accepted as a transfer coding name.
deflate
Using the zlib structure is accepted as a transfer coding name.
gzip
A format using the Lempel-Ziv coding (LZ77), with a 32-bit CRC is accepted as a transfer coding name.
trailers
Indicates that the client is willing to accept trailer fields in a chunked transfer coding.
q

When multiple transfer codings are acceptable, the q parameter of the quality value syntax can rank codings by preference.

Specifications

SpecificationTitle
RFC 7230, section 4.3: TEHypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing

Browser compatibility

BCD tables only load in the browser

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:75 次

字数:3891

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文