mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 14:57:37 +02:00
[ticket/14285] Send content-type is application/octet-stream if uknown
PHPBB3-14285
This commit is contained in:
@@ -88,12 +88,14 @@ class controller
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$this->response->headers->set('Content-Type', $file_info->mimetype);
|
$content_type = $file_info->mimetype;
|
||||||
}
|
}
|
||||||
catch (\phpbb\storage\exception\exception $e)
|
catch (\phpbb\storage\exception\exception $e)
|
||||||
{
|
{
|
||||||
// Just don't send this header
|
$content_type = 'application/octet-stream';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->response->headers->set('Content-Type', $content_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->response->headers->has('Content-Length'))
|
if (!$this->response->headers->has('Content-Length'))
|
||||||
|
Reference in New Issue
Block a user