From 3003bb1c99d3130d64471ec1bb1425f66d15a798 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 30 Apr 2013 16:23:19 +0200 Subject: [PATCH] Don't fall thru to Hydra::View::NARInfo This caused exceptions like: Caught exception in Hydra::Controller::Build->view_build "writing to file: Broken pipe at /nix/store/ihdb3widsq1dk7sbl5vqjxfcxb5ypad4-hydra-0.1pre1297-8158093/libexec/hydra/lib/Hydra/Controller/Build.pm line 59." because the connection to the Nix daemon would be terminated due to a protocol violation (calling queryPathInfo with an empty string). --- src/lib/Hydra/Controller/Root.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index 7ea27977..6d5a1005 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -225,8 +225,9 @@ sub narinfo :LocalRegex('^([a-z0-9]+).narinfo$') :Args(0) { $c->response->content_type('text/plain'); $c->stash->{plain}->{data} = "does not exist\n"; $c->forward('Hydra::View::Plain'); + return; } - + $c->stash->{storePath} = $path; $c->forward('Hydra::View::NARInfo'); }