Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
fix(server): Use SplFile::getRealPath for Response::sendfile Oper…
Browse files Browse the repository at this point in the history
…ation for a BinaryFileReponse (#91)

Fixes #90
  • Loading branch information
fjogeleit authored and k911 committed Dec 3, 2019
1 parent d3e1694 commit 0278db7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bridge/Symfony/HttpFoundation/ResponseProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function process(HttpFoundationResponse $httpFoundationResponse, SwooleRe
$swooleResponse->status($httpFoundationResponse->getStatusCode());

if ($httpFoundationResponse instanceof BinaryFileResponse) {
$swooleResponse->sendfile($httpFoundationResponse->getFile()->getFilename());
$swooleResponse->sendfile($httpFoundationResponse->getFile()->getRealPath());
} else {
$swooleResponse->end($httpFoundationResponse->getContent());
}
Expand Down

0 comments on commit 0278db7

Please sign in to comment.