mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
Log RAW request for #867
This commit is contained in:
parent
c30c41a79b
commit
da4b9684b4
1 changed files with 10 additions and 4 deletions
|
|
@ -156,8 +156,7 @@ trait Raw
|
|||
$sFileNameOut = $this->MainClearFileName($sFileNameIn, $sContentTypeIn, $sMimeIndex);
|
||||
|
||||
$rResource = $this->FilesProvider()->GetFile($oAccount, $sFileHashIn);
|
||||
if (\is_resource($rResource))
|
||||
{
|
||||
if (\is_resource($rResource)) {
|
||||
\header('Content-Type: '.$sContentTypeOut);
|
||||
\header('Content-Disposition: attachment; '.
|
||||
\trim(\MailSo\Base\Utils::EncodeHeaderUtf8AttributeValue('filename', $sFileNameOut)));
|
||||
|
|
@ -181,14 +180,21 @@ trait Raw
|
|||
$self = $this;
|
||||
return $this->MailClient()->MessageMimeStream(
|
||||
function($rResource, $sContentType, $sFileName, $sMimeIndex = '') use (
|
||||
$self, $oAccount, $sRawKey, $sContentTypeIn, $sFileNameIn, $bDownload, $bThumbnail,
|
||||
$self, $sRawKey, $sContentTypeIn, $sFileNameIn, $bDownload, $bThumbnail,
|
||||
$bIsRangeRequest, $sRangeStart, $sRangeEnd
|
||||
) {
|
||||
if ($oAccount && \is_resource($rResource)) {
|
||||
if (\is_resource($rResource)) {
|
||||
\MailSo\Base\Utils::ResetTimeLimit();
|
||||
|
||||
$self->cacheByKey($sRawKey);
|
||||
|
||||
$self->Logger()->Write(\print_r([
|
||||
$sFileName,
|
||||
$sContentType,
|
||||
$sFileNameIn,
|
||||
$sContentTypeIn
|
||||
],true), \LOG_DEBUG, 'RAW');
|
||||
|
||||
if ($sFileNameIn) {
|
||||
$sFileName = $sFileNameIn;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue