From 0cf4e7494f912f3044ebf3f731feb74411049e3a Mon Sep 17 00:00:00 2001 From: DaSourcerer Date: Sat, 3 Jan 2015 13:06:42 +0100 Subject: [PATCH 1/2] Removed Content-Transfer-Encoding from the list of default download headers `Content-Transfer-Encoding` is not a valid HTTP header (cf [RFC 7230, section 3.3.1](http://tools.ietf.org/html/rfc7230#section-3.3.1), [RFC 7231, section 8.3](http://tools.ietf.org/html/rfc7231#section-8.3), [IANA Message Header Registry](http://www.iana.org/assignments/message-headers/message-headers.xhtml)). The correct HTTP pendant would be `Transfer-Encoding: identity`, which were entirely bogus. --- framework/web/Response.php | 1 - 1 file changed, 1 deletion(-) diff --git a/framework/web/Response.php b/framework/web/Response.php index 5f711645c6..866dc48f91 100644 --- a/framework/web/Response.php +++ b/framework/web/Response.php @@ -557,7 +557,6 @@ class Response extends \yii\base\Response ->setDefault('Accept-Ranges', 'bytes') ->setDefault('Expires', '0') ->setDefault('Cache-Control', 'must-revalidate, post-check=0, pre-check=0') - ->setDefault('Content-Transfer-Encoding', 'binary') ->setDefault('Content-Disposition', "$disposition; filename=\"$attachmentName\""); if ($mimeType !== null) { From f3f5fcae4b43d3352bacf3c19f652fff4f0b80b7 Mon Sep 17 00:00:00 2001 From: DaSourcerer Date: Sun, 4 Jan 2015 12:36:23 +0100 Subject: [PATCH 2/2] Changelog update --- framework/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index f594f7220c..e8f2b7c2ee 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -11,6 +11,7 @@ Yii Framework 2 Change Log - Bug #6648: Added explicit type casting to avoid dblib issues on SQL Server 2014 (o-rey) - Bug #6691: Fixed console help description parsing with UTF8 characters (cebe) - Bug #6717: Fixed issue with UrlManager not matching a route on url creation when it was prefixed with `/` and pattern was empty (cebe) +- Bug #6736: Removed `Content-Transfer-Encoding` from the list of default download headers (DaSourcerer) - Enh #4502: Added alias support to URL route when calling `Url::toRoute()` and `Url::to()` (qiangxue, lynicidn) - Enh #6247: Logger and error handler are now using slightly less memory (stepanselyuk, samdark) - Enh #6434: Added `yii\behaviors\SluggableBehavior::immutable` to support keeping the generated slug unchanged (trntv)