Added close session before start file stream
This commit is contained in:
parent
4f75f337be
commit
edd26b0e35
4 changed files with 13 additions and 1 deletions
|
@ -22,3 +22,6 @@ jobs:
|
|||
|
||||
- name: Run test suite
|
||||
run: vendor/bin/phpunit
|
||||
|
||||
- name: Send docker repo update
|
||||
run: curl -H "Content-Type: application/json" --data '{"docker_tag": "master"}' -X POST https://registry.hub.docker.com/u/pe46dro/xbackbone-docker/trigger/505df075-f5b6-48bf-a22c-ce678f477929/
|
|
@ -325,6 +325,7 @@ class MediaController extends Controller
|
|||
protected function streamMedia(Request $request, Response $response, Filesystem $storage, $media, string $disposition = 'inline'): Response
|
||||
{
|
||||
set_time_limit(0);
|
||||
$this->session->close();
|
||||
$mime = $storage->getMimetype($media->storage_path);
|
||||
|
||||
if ((param($request, 'width') !== null || param($request, 'height') !== null) && explode('/', $mime)[0] === 'image') {
|
||||
|
|
|
@ -135,6 +135,15 @@ class Session
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the current session
|
||||
*
|
||||
* @return bool|void
|
||||
*/
|
||||
public function close() {
|
||||
return session_write_close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve flash alerts.
|
||||
*
|
||||
|
|
|
@ -12,7 +12,6 @@ class LoginControllerTest extends TestCase
|
|||
public function it_loads_the_login_page()
|
||||
{
|
||||
$this->client->request('GET', '/login');
|
||||
//$this->client->getResponse();
|
||||
$this->assertSame(200, $this->client->getResponse()->getStatusCode());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue