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:
parent
dc1d3683a8
commit
821964dc7a
@ -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'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user