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-Tag: 3.04~86^2~7 X-Git-Url: http://git.tremily.us/?p=ikiwiki.git;a=commitdiff_plain;h=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."),