Content-Encoding:

Content-Encoding: ヘッダー (HTTP)

[430] Content-Encoding: ヘッダーは、 表現に適用されている内容符号化を表します。

仕様書

意味

[431] Content-Encoding: ヘッダーは、 MIME型に含まれているもの以外で表現に対して適用されている内容符号化を示します >>429

[432] 例えば XML ファイルを gzip 圧縮して転送する場合、 Content-Type:application/xml となり、 Content-Encoding:gzip となります。

[439] 表現が実際にメッセージに含まれる場合はその内容符号化を表しますが、 HEAD の場合は、 GET だったなら含まれるであろう表現内容符号化を表します。

構文

[433] 値は、1つ以上の内容符号化の値のリスト (#) です >>429

  1. 字句
  2. *
    1. OWS
    2. ,
    3. OWS
    4. 字句

[435] 表現に対して複数の内容符号化が適用されているときは、 符号化を行う送信者は、適用順に並べた値を Content-Encoding: ヘッダーに含めなければなりません >>429

[436] 符号化についての追加の引数は、他のヘッダーによって指定できます >>429

[437] 現時点でそのような例はありません。転送符号化については引数を指定する構文がありますが、 内容符号化には指定できません。

文脈

[434] このヘッダーは、複数指定できます。

[7] FCAST でも使うことができます >>6, >>8

処理

[438] 内容符号化の項を参照してください。

[10] FCAST の実装は、 Content-Encoding: gzip に対応しなければなりません >>9

encoding 異体属性

[4] 異体説明encoding 異体属性は、 Content-Encoding: ヘッダーに相当するものです >>3

[5] この異体属性RFC に含まれていない Apache の拡張です。

歴史

[2] HTTP92 時点では x-compressx-gzip が使われていました >>1

メモ

[427] RFC 4463 - A Media Resource Control Protocol (MRCP) Developed by Cisco, Nuance, and Speechworks ( ( 版)) http://tools.ietf.org/html/rfc4463#section-5.4.7

[428] RFC 6787 - Media Resource Control Protocol Version 2 (MRCPv2) ( ( 版)) http://tools.ietf.org/html/rfc6787#section-6.2.9

[423] Content-Encoding: identity を送ってくるがあります。 これをが意図したように扱えないクライアントがあります。

[440] Fix request and response's body story · 578768a · whatwg/fetch ( ( 版)) https://github.com/whatwg/fetch/commit/578768a0c40b673ed9ce3e23020115af15d6ac49

[441] Reference Gecko bug for Content-Encoding quirk per https://github.com/sl... · cf2b3ba · whatwg/fetch ( ( 版)) https://github.com/whatwg/fetch/commit/cf2b3ba4968d2afb5c1d548f0803d98845a1d808

[442] 1030660 – Is ClearBogusContentEncodingIfNeeded() needed? ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=1030660

[443] 35956 – File extension not changed but gzipped files expanded when saving ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=35956

[11] 52282 – (ftp:// or file://) suffixes like (.gz) are Content-Encoding (not Content-Type) [decode and display .gz file] ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=52282

[12] draft-ietf-httpbis-cice-03 - Hypertext Transfer Protocol (HTTP) Client-Initiated Content-Encoding ( 版) https://tools.ietf.org/html/draft-ietf-httpbis-cice-03

[13] Add PushManager.supportedContentEncodings (#252) (beverloo著, ) https://github.com/w3c/push-api/commit/813f9af75d59e3fa1522db9aeeaa2bd158ff10bf

[14] Service » HTTP interface · validator/validator Wiki () https://github.com/validator/validator/wiki/Service-%C2%BB-HTTP-interface#request-compression

The checker supports HTTP request compression. To use it, compress the request entity body using gzip and specify Content-Encoding: gzip as a request header.

[15] Remove Gecko-only quirk (annevk著, ) https://github.com/whatwg/fetch/commit/a8df5b86f4134f58baf6a3cab6cc767eb866784f