1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-30 02:59:29 +02:00

[ticket/14285] Send content-type is application/octet-stream if uknown

PHPBB3-14285
This commit is contained in:
Rubén Calvo 2018-07-11 07:52:09 +02:00 committed by rubencm
parent dc1d3683a8
commit 821964dc7a

View File

@ -88,12 +88,14 @@ class controller
{
try
{
$this->response->headers->set('Content-Type', $file_info->mimetype);
$content_type = $file_info->mimetype;
}
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'))