In my application when the user access a page that return a BinaryFileResponse he gets disconnected.
When I put a die before the return I can dump the session and the user and reload without any issue, BUT everytime the app serve a file the user get disconnected on the next request ... Its driving me nuts atm as I just made a composer update before the issue appears... :(
I tried to close the session handle. I tried every other route ... this is the only one dropping the security token
<?php
// [...]
$response = new BinaryFileResponse($f->filePath(),200,[],false);
$disposition = HeaderUtils::makeDisposition(
$fileManager->getDisposition($f),
$f->getFilename()
);
if($f->getEtag() !== null){
$response->setEtag($f->getEtag());
}
$response->headers->set('Content-Disposition', $disposition);
$response->headers->set('Content-Type', $f->getContentType());
return $response;
It just drop the security token on the next request... is this something related to the streamed response ?
EDIT : it only happen on Chrome (latest macOS)
It was a bug in the Google Chrome release (Version 75.0.3770.142) ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With