Trailer

Trailer レスポンスヘッダーにより、メッセージ本体の送信中に動的に生成される可能性のあるメタデータ(メッセージの完全性チェック、デジタル署名、後処理のステータスなど)を提供するために、送信者がチャンクされたメッセージの終わりに追加のフィールドを含めることが可能になります。

メモ: トレーラーフィールドを許可するには、TE リクエストヘッダーを "trailer" に設定する必要があります。

ヘッダーの種類 リクエストヘッダーレスポンスヘッダーペイロードヘッダー
禁止ヘッダー名 はい

構文

http
Trailer: header-names

ディレクティブ

header-names

チャンクされたメッセージのトレーラー部分に存在する HTTP ヘッダーフィールド。 以下のヘッダーフィールドは許可されていません

トレーラーヘッダーを使用するチャンク転送エンコード方式

この例では、Expires ヘッダーがチャンクされたメッセージの終わりに使用され、末尾のヘッダーとして有益な役割を果たします。

http
HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
Trailer: Expires

7\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
HTTP Semantics
# field.trailer
HTTP/1.1
# chunked.trailer.section

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Trailer

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support

関連情報