Set the Content-Type properly

This commit is contained in:
Eelco Dolstra 2012-08-01 18:00:55 +00:00
parent 13688e364f
commit aa8bf564e2
2 changed files with 2 additions and 2 deletions

View file

@ -89,7 +89,7 @@ sub nixexprs : Chained('nix') PathPart('nixexprs.tar.bz2') Args(0) {
sub binary_cache_url : Chained('nix') PathPart('binary-cache-url') Args(0) { sub binary_cache_url : Chained('nix') PathPart('binary-cache-url') Args(0) {
my ($self, $c) = @_; my ($self, $c) = @_;
$c->stash->{'plain'} = { data => $c->uri_for('/') }; $c->stash->{'plain'} = { data => $c->uri_for('/') };
$c->header('Content-Type' => 'text/plain'); $c->response->content_type('text/plain');
$c->forward('Hydra::View::Plain'); $c->forward('Hydra::View::Plain');
} }

View file

@ -198,7 +198,7 @@ sub nar :Local :Args(1) {
sub nix_cache_info :Path('nix-cache-info') :Args(0) { sub nix_cache_info :Path('nix-cache-info') :Args(0) {
my ($self, $c) = @_; my ($self, $c) = @_;
$c->header('Content-Type' => 'text/plain'); $c->response->content_type('text/plain');
$c->stash->{'plain'} = { data => $c->stash->{'plain'} = { data =>
#"StoreDir: $Nix::Config::storeDir\n" . # FIXME #"StoreDir: $Nix::Config::storeDir\n" . # FIXME
"StoreDir: /nix/store\n" . "StoreDir: /nix/store\n" .