From 61a55720a4942efea39333994d8ad0422eae445a Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 9 Apr 2016 00:12:57 +0200 Subject: [PATCH] Don't include Content-Length for now --- controllers/FrontController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 663f255..096966e 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -221,9 +221,9 @@ class FrontController $video = $this->download->getJSON($url, $format); $client = new \GuzzleHttp\Client(); $stream = $client->request('GET', $video->url, array('stream'=>true)); - $response = $response->withHeader('Content-Disposition', 'inline; filename="'.$video->_filename.'"'); + $response = $response->withHeader('Content-Disposition', 'attachment; filename="'.$video->_filename.'"'); $response = $response->withHeader('Content-Type', $stream->getHeader('Content-Type')); - $response = $response->withHeader('Content-Length', $stream->getHeader('Content-Length')); + //$response = $response->withHeader('Content-Length', $stream->getHeader('Content-Length')); if ($request->isGet()) { $response = $response->withBody($stream->getBody()); }