note 107044 modified in function.header by danbrown

From: Date: Tue, 03 Jan 2012 21:46:43 +0000
Subject: note 107044 modified in function.header by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185283@lists.php.net to get a copy of this message
I often see the Content-Transfer-Encoding header in user-provided examples. It should be noted that this is a MIME header and is not actually used in HTTP, which uses Transfer-Encoding and Content-Encoding instead (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 and http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.41). For example, the HTTP equivalent to the MIME header 'Content-Transfer-Encoding: binary' is 'Content-Encoding: identity'. Keep that in mind when sending headers. --was-- I often see the Content-Transfer-Encoding header in user-provided examples. It should be noted that this is a MIME header and is not actually used in HTTP, which uses Transfer-Encoding and Content-Encoding instead (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 and http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.41). For example, the HTTP equivalent to the MIME header 'Content-Transfer-Encoding: binary' is 'Content-Encoding: identity' (see this question and answer on StackExchange for differences between Content-Encoding and Transfer-Encoding and why it is generally favorable to use the former: http://stackapps.com/questions/916/why-content-encoding-gzip-rather-than-transfer-encoding-gzip). Keep that in mind when sending headers. http://php.net/manual/en/function.header.php

« previous php.notes (#185283) next »