mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
[ticket/14285] Don't set cache-control by default
PHPBB3-14285
This commit is contained in:
parent
b1495bd54a
commit
6e345c37a9
3 changed files with 8 additions and 4 deletions
|
@ -243,6 +243,9 @@ class attachment extends controller
|
||||||
);
|
);
|
||||||
extract($this->dispatcher->trigger_event('core.send_file_to_browser_before', compact($vars)));
|
extract($this->dispatcher->trigger_event('core.send_file_to_browser_before', compact($vars)));
|
||||||
|
|
||||||
|
// TODO: The next lines should go better in prepare, also the mimetype is handled by the storage table
|
||||||
|
// so probably can be removed
|
||||||
|
|
||||||
// Content-type header
|
// Content-type header
|
||||||
$this->response->headers->set('Content-Type', $attachment['mimetype']);
|
$this->response->headers->set('Content-Type', $attachment['mimetype']);
|
||||||
|
|
||||||
|
@ -276,9 +279,9 @@ class attachment extends controller
|
||||||
*/
|
*/
|
||||||
protected function prepare($file)
|
protected function prepare($file)
|
||||||
{
|
{
|
||||||
parent::prepare($file);
|
$this->response->setPivate(); // But default should be private, but make sure of it
|
||||||
|
|
||||||
$this->response->setPivate();
|
parent::prepare($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -405,6 +408,7 @@ class attachment extends controller
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if downloading item is allowed
|
* Check if downloading item is allowed
|
||||||
|
* FIXME (See: https://tracker.phpbb.com/browse/PHPBB3-15264 and http://area51.phpbb.com/phpBB/viewtopic.php?f=81&t=51921)
|
||||||
*/
|
*/
|
||||||
protected function download_allowed()
|
protected function download_allowed()
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,6 +96,8 @@ class avatar extends controller
|
||||||
*/
|
*/
|
||||||
protected function prepare($file)
|
protected function prepare($file)
|
||||||
{
|
{
|
||||||
|
$this->response->setPublic();
|
||||||
|
|
||||||
$disposition = $this->response->headers->makeDisposition(
|
$disposition = $this->response->headers->makeDisposition(
|
||||||
ResponseHeaderBag::DISPOSITION_INLINE,
|
ResponseHeaderBag::DISPOSITION_INLINE,
|
||||||
rawurlencode($file)
|
rawurlencode($file)
|
||||||
|
|
|
@ -119,8 +119,6 @@ class controller
|
||||||
*/
|
*/
|
||||||
protected function prepare($file)
|
protected function prepare($file)
|
||||||
{
|
{
|
||||||
$this->response->setPublic();
|
|
||||||
|
|
||||||
$file_info = $this->storage->file_info($file);
|
$file_info = $this->storage->file_info($file);
|
||||||
|
|
||||||
if (!$this->response->headers->has('Content-Type'))
|
if (!$this->response->headers->has('Content-Type'))
|
||||||
|
|
Loading…
Add table
Reference in a new issue