mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/14285] Temporal fix for StreamedResponse
PHPBB3-14285
This commit is contained in:
parent
d11b83a4c5
commit
4abdabe6f4
2 changed files with 33 additions and 3 deletions
|
@ -17,8 +17,8 @@ use phpbb\cache\service;
|
|||
use phpbb\db\driver\driver_interface;
|
||||
use phpbb\exception\http_exception;
|
||||
use phpbb\storage\storage;
|
||||
use phpbb\storage\streamed_response;
|
||||
use Symfony\Component\HttpFoundation\Request as symfony_request;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
class controller
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ class controller
|
|||
/** @var storage */
|
||||
protected $storage;
|
||||
|
||||
/** @var StreamedResponse */
|
||||
/** @var streamed_response */
|
||||
protected $response;
|
||||
|
||||
/** @var symfony_request */
|
||||
|
@ -43,7 +43,7 @@ class controller
|
|||
$this->db = $db;
|
||||
$this->storage = $storage;
|
||||
$this->symfony_request = $symfony_request;
|
||||
$this->response = new StreamedResponse();
|
||||
$this->response = new streamed_response();
|
||||
}
|
||||
|
||||
public function handle($file)
|
||||
|
|
30
phpBB/phpbb/storage/streamed_response.php
Normal file
30
phpBB/phpbb/storage/streamed_response.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\storage;
|
||||
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
// Temporal fix for: https://github.com/symfony/symfony/issues/27924
|
||||
class streamed_response extends StreamedResponse
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setNotModified()
|
||||
{
|
||||
$this->setCallback(function () {});
|
||||
|
||||
return parent::setNotModified();
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue