diff --git a/src/lib/Hydra/View/Plain.pm b/src/lib/Hydra/View/Plain.pm index 868c74f8..452a3d46 100644 --- a/src/lib/Hydra/View/Plain.pm +++ b/src/lib/Hydra/View/Plain.pm @@ -7,7 +7,9 @@ use base 'Catalyst::View::Download::Plain'; sub process { my ($self, $c) = @_; $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}); }