diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php index 2b5c33058..2e2cb3c75 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -8663,12 +8663,14 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack if ($bDownload || $sLoadedData) { - \header('Content-Type: '.$sContentTypeOut); - \header('Content-Disposition: '.($bDownload ? 'attachment' : 'inline').'; '. + if (!headers_sent()) { + \header('Content-Type: '.$sContentTypeOut); + \header('Content-Disposition: '.($bDownload ? 'attachment' : 'inline').'; '. \trim(\MailSo\Base\Utils::EncodeHeaderUtf8AttributeValue('filename', $sFileNameOut)), true); - \header('Accept-Ranges: bytes'); - \header('Content-Transfer-Encoding: binary'); + \header('Accept-Ranges: bytes'); + \header('Content-Transfer-Encoding: binary'); + } if ($bIsRangeRequest && !$sLoadedData) {