Slim now handles Content-Length correctly with HTTP streams
This commit is contained in:
parent
f7577b9825
commit
63ec60b4ad
3 changed files with 10 additions and 9 deletions
|
@ -264,7 +264,7 @@ class FrontController
|
|||
$stream = $client->request('GET', $video->url, array('stream'=>true));
|
||||
$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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue