Skip to content

Transfer-Encoding Header: Remove mention of trailers value#40376

Merged
hamishwillee merged 2 commits intomdn:mainfrom
mhils:patch-1
Jul 16, 2025
Merged

Transfer-Encoding Header: Remove mention of trailers value#40376
hamishwillee merged 2 commits intomdn:mainfrom
mhils:patch-1

Conversation

@mhils
Copy link
Copy Markdown
Contributor

@mhils mhils commented Jul 15, 2025

Description

The page for Transfer-Encoding currently incorrectly mentions a permissible trailers value for HTTP/2. But trailers is only valid for the TE header. Transfer-Encoding: trailers is not a thing. There already is a (correct) note on https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/TE.

The PR that introduced this (#22032) correctly cites the RFC for TE, but then mixes up TE and Transfer-Encoding.

Additional details

From https://datatracker.ietf.org/doc/html/rfc9113#section-8.2.2 (emphasis mine):

An endpoint MUST NOT generate an HTTP/2 message containing connection-specific header fields. This includes the Connection header field and those listed as having connection-specific semantics in Section 7.6.1 of [HTTP] (that is, Proxy-Connection, Keep-Alive, Transfer-Encoding, and Upgrade).

The only exception to this is the TE header field, which MAY be present in an HTTP/2 request; when it is, it MUST NOT contain any value other than "trailers".

Related issues and pull requests

Relates to #22032

`trailers` is only valid for the `TE` header. `Transfer-Encoding: trailers` is not a thing. There already is a (correct) note on https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/TE, so this just needs to be removed.

The PR that introduced this (mdn#22032) correctly cites the RFC for `TE`, but then mixes up TE and Transfer-Encoding.
@mhils mhils requested a review from a team as a code owner July 15, 2025 13:23
@mhils mhils requested review from hamishwillee and removed request for a team July 15, 2025 13:23
@github-actions github-actions bot added Content:HTTP HTTP docs size/xs [PR only] 0-5 LoC changed labels Jul 15, 2025
- {{HTTPHeader("Accept-Encoding")}}
- {{HTTPHeader("Content-Encoding")}}
- {{HTTPHeader("Content-Length")}}
- Header fields that regulate the use of trailers: {{HTTPHeader("TE")}} (requests) and {{HTTPHeader("Trailer")}} (responses).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not relevant if trailers is not allowed.

Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much - good catch.

And welcome to MDN!

@github-actions
Copy link
Copy Markdown
Contributor

Preview URLs

Flaws (3)

URL: /en-US/docs/Web/HTTP/Reference/Headers/Transfer-Encoding
Title: Transfer-Encoding header
Flaw count: 3

  • unknown:
    • No generic content config found
    • no blog root
    • no blog root

@hamishwillee hamishwillee merged commit c98b77c into mdn:main Jul 16, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTTP HTTP docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants