From: Simon McVittie
Date: Sat, 31 Jan 2009 16:51:13 +0000 (+0000)
Subject: CGI: if the page is missing, give the "missing page" a 404 status
X-Git-Url: https://scripts.mit.edu/gitweb/www/ikiwiki.git/commitdiff_plain/78d1b2340eeacdad7bcccb9c7fa450ac47728341
CGI: if the page is missing, give the "missing page" a 404 status
---
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index f23d44fd6..fe8457262 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -318,7 +318,7 @@ sub cgi_goto ($;$) {
my $link = bestlink("", $page);
if (! length $link) {
- print "Content-type: text/html\n\n";
+ print $q->header(-status => "404 Not Found");
print misctemplate(gettext("missing page"),
"
".
sprintf(gettext("The page %s does not exist."),