mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/14285] Send content-type is application/octet-stream if uknown
PHPBB3-14285
This commit is contained in:
parent
dc1d3683a8
commit
821964dc7a
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue