June 26th, 2024

Trailer (As Opposite to HTTP Header)

The Trailer response header in HTTP allows senders to add extra fields at the end of chunked messages for metadata like integrity checks. TE header must be set to "trailers" to enable this feature, enhancing data transmission security.

Read original articleLink Icon
Trailer (As Opposite to HTTP Header)

The Trailer response header in HTTP allows senders to add extra fields at the end of chunked messages to provide dynamically generated metadata like message integrity checks or digital signatures. These fields are included after the message body is sent. The TE request header must be set to "trailers" to enable trailer fields. The header-names directive specifies the header fields present in the trailer part of chunked messages. Certain header fields are disallowed in trailers, such as message framing headers, routing headers, request modifiers, authentication headers, and specific content-related headers. An example demonstrates the use of the Expires header as a trailing header in a chunked transfer encoding scenario. This feature enhances the flexibility and security of data transmission over HTTP.

Link Icon 2 comments
By @1vuio0pswjnm7 - 5 months
Over decades of doing HTTP requests via command line, I think I have only seen this used once. I often see the chunk sizes, i.e., the "0" at the end. But I never see a trailer.