SOFTELメモ Developer's blog

【HTTP】Content-Transfer-Encoding というヘッダ項目を見つけたのですが、有効ですか?

Category: develop Tagged: 2013/01/19

問題

Content-Transfer-Encoding というヘッダ項目を見つけたのですが、有効ですか?

Content-Type: application/pdf
Content-Transfer-Encoding: base64

とか

header("Content-Transfer-Encoding: binary");

といった指定です。

答え

HTTPのヘッダには、Content-Transfer-Encoding という項目はない。

クライアントはそれを無視する。

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

"gzipで圧縮してあるよ"などの情報は、Content-Encoding で送る。

content-transfer-encoding は、メールで使われるヘッダ。

関連するメモ

コメント