Merge pull request #1375 from pierre-alain-b/master

Fixing #1284, conflict in headers creation when loading images in body message, "Cannot modify header information - headers already sent"
This commit is contained in:
RainLoop Team 2018-02-21 02:37:31 +03:00 committed by GitHub
commit 6e20d5fccc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8696,12 +8696,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)
{