Don't include Content-Length for now
This commit is contained in:
parent
734271c67c
commit
61a55720a4
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue