Skip to content

Commit

Permalink
Issue #1470: Why charset utf-8 on an octet-stream ?
Browse files Browse the repository at this point in the history
  • Loading branch information
bschmalhofer committed Dec 3, 2021
1 parent a050aeb commit 3fc3296
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Kernel/Modules/AdminSupportDataCollector.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package Kernel::Modules::AdminSupportDataCollector;

use strict;
use warnings;
use v5.24;

use Kernel::System::SupportDataCollector::PluginBase;

Expand Down Expand Up @@ -347,8 +348,11 @@ sub _GenerateSupportBundle {
},
);

return $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Attachment(
my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');

return $LayoutObject->Attachment(
ContentType => 'text/html',
Charset => $LayoutObject->{UserCharset},
Content => $JSONString,
Type => 'inline',
NoCache => 1,
Expand Down Expand Up @@ -413,8 +417,8 @@ sub _DownloadSupportBundle {

return $LayoutObject->Attachment(
Filename => $Filename,
ContentType => 'application/octet-stream; charset=' . $LayoutObject->{UserCharset},
Content => $$Content,
ContentType => 'application/octet-stream',
Content => $Content->$*,
);
}

Expand Down Expand Up @@ -567,8 +571,11 @@ sub _SendSupportBundle {
},
);

return $Kernel::OM->Get('Kernel::Output::HTML::Layout')->Attachment(
my $LayoutObject = $Kernel::OM->Get('Kernel::Output::HTML::Layout');

return $LayoutObject->Attachment(
ContentType => 'text/html',
Charset => $LayoutObject->{UserCharset},
Content => $JSONString,
Type => 'inline',
NoCache => 1,
Expand Down

0 comments on commit 3fc3296

Please sign in to comment.