From 041053b1712b317306043195d4f3afc358f355fb Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 16 Jul 2015 14:24:07 -0400 Subject: [PATCH] SAAS-922 - urlencode content headers to ensure compatibility --- .../application/cloud_storage/Amazon_S3StorageBackend.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php b/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php index 0d86ef52c..2f023aeea 100644 --- a/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php +++ b/airtime_mvc/application/cloud_storage/Amazon_S3StorageBackend.php @@ -46,7 +46,7 @@ class Amazon_S3StorageBackend extends StorageBackend { $urls = array(); - $s3args = array('ResponseContentDisposition' => 'attachment; filename="' . $contentDispositionFilename. '"'); + $s3args = array('ResponseContentDisposition' => 'attachment; filename="' . urlencode($contentDispositionFilename) . '"'); $signedS3Url = $this->s3Client->getObjectUrl($this->getBucket(), $resourceId, '+60 minutes', $s3args); //If we're using the proxy cache, we need to modify the request URL after it has @@ -65,7 +65,7 @@ class Amazon_S3StorageBackend extends StorageBackend $p["path"] = substr($p["path"], 1 + strlen($this->getBucket())); } $proxyUrl = $p["scheme"] . "://" . $p["host"] . $p["path"] . "?" . $p["query"]; - //Add this proxy cache URL to the list of download URLs. + //Add this proxy cache URL to the list of download URLs.s array_push($urls, $proxyUrl); }