forked from lix-project/hydra
Fix serving plain text files
This commit is contained in:
parent
5986aae704
commit
b7bc4384b7
|
@ -7,7 +7,9 @@ use base 'Catalyst::View::Download::Plain';
|
||||||
sub process {
|
sub process {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->clear_encoding;
|
$c->clear_encoding;
|
||||||
$c->response->content_type('text/plain; charset=utf-8') if $c->response->content_type() eq "text/plain";
|
my $type = $c->response->content_type();
|
||||||
|
$c->response->content_type('text/plain; charset=utf-8')
|
||||||
|
if !$type || $c->response->content_type() eq "text/plain";
|
||||||
$c->response->body($c->stash->{plain}->{data});
|
$c->response->body($c->stash->{plain}->{data});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue