forked from lix-project/hydra
Set utf-8 charset for raw logs
Also fix incorrect use of Content-Encoding header in View::Plain.
This commit is contained in:
parent
3fcfa20d1a
commit
140cbe9302
|
@ -9,7 +9,7 @@ sub process {
|
||||||
|
|
||||||
my $logPath = $c->stash->{logPath};
|
my $logPath = $c->stash->{logPath};
|
||||||
|
|
||||||
$c->response->content_type('text/plain');
|
$c->response->content_type('text/plain; charset=utf-8');
|
||||||
|
|
||||||
my $fh = new IO::Handle;
|
my $fh = new IO::Handle;
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@ use base 'Catalyst::View::Download::Plain';
|
||||||
|
|
||||||
sub process {
|
sub process {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->response->content_encoding("utf-8");
|
$c->response->content_type('text/plain; charset=utf-8') unless $c->response->content_type() ne "";
|
||||||
$c->response->content_type('text/plain') unless $c->response->content_type() ne "";
|
|
||||||
$c->response->body($c->stash->{plain}->{data});
|
$c->response->body($c->stash->{plain}->{data});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue