hydra/src/lib/Hydra/View/Plain.pm
Ludovic Courtès 2d5e06918b Hydra::View::Plain: Explicitly set the response body.
This fixes a bug with Catalyst 1.39 whereby a raw hash table would
erroneously be returned for /nix-cache-info.
2013-07-12 16:53:48 +02:00

15 lines
330 B
Perl

package Hydra::View::Plain;
use strict;
use warnings;
use base 'Catalyst::View::Download::Plain';
sub process {
my ($self, $c) = @_;
$c->response->content_encoding("utf-8");
$c->response->content_type('text/plain') unless $c->response->content_type() ne "";
$c->response->body($c->stash->{plain}->{data});
}
1;