Don't include Content-Length for now

This commit is contained in:
Pierre Rudloff 2016-04-09 00:12:57 +02:00
parent 734271c67c
commit 61a55720a4

View file

@ -221,9 +221,9 @@ class FrontController
$video = $this->download->getJSON($url, $format); $video = $this->download->getJSON($url, $format);
$client = new \GuzzleHttp\Client(); $client = new \GuzzleHttp\Client();
$stream = $client->request('GET', $video->url, array('stream'=>true)); $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-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()) { if ($request->isGet()) {
$response = $response->withBody($stream->getBody()); $response = $response->withBody($stream->getBody());
} }