From 438d7f7c5c832376b39dd55354f8e6fb77ce9f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 12 Jul 2013 16:52:40 +0200 Subject: [PATCH] Reply 404 for requests for non-existent .narinfo. --- src/lib/Hydra/Controller/Root.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index 52ffa653..ca57ce1c 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -282,6 +282,7 @@ sub narinfo :LocalRegex('^([a-z0-9]+).narinfo$') :Args(0) { my $path = queryPathFromHashPart($hash); if (!$path) { + $c->response->status(404); $c->response->content_type('text/plain'); $c->stash->{plain}->{data} = "does not exist\n"; $c->forward('Hydra::View::Plain');