From aa8bf564e2f8c9c40c27335c0c0153d17b03b877 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Aug 2012 18:00:55 +0000 Subject: [PATCH] Set the Content-Type properly --- src/lib/Hydra/Base/Controller/NixChannel.pm | 2 +- src/lib/Hydra/Controller/Root.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Base/Controller/NixChannel.pm b/src/lib/Hydra/Base/Controller/NixChannel.pm index 3d013539..0f100df6 100644 --- a/src/lib/Hydra/Base/Controller/NixChannel.pm +++ b/src/lib/Hydra/Base/Controller/NixChannel.pm @@ -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) { my ($self, $c) = @_; $c->stash->{'plain'} = { data => $c->uri_for('/') }; - $c->header('Content-Type' => 'text/plain'); + $c->response->content_type('text/plain'); $c->forward('Hydra::View::Plain'); } diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index c0bbc320..832f2b23 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -198,7 +198,7 @@ sub nar :Local :Args(1) { sub nix_cache_info :Path('nix-cache-info') :Args(0) { my ($self, $c) = @_; - $c->header('Content-Type' => 'text/plain'); + $c->response->content_type('text/plain'); $c->stash->{'plain'} = { data => #"StoreDir: $Nix::Config::storeDir\n" . # FIXME "StoreDir: /nix/store\n" .