X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=IkiWiki%2FCGI.pm;h=fe845726229137b8c623cb8fda86100785d82d07;hb=78d1b2340eeacdad7bcccb9c7fa450ac47728341;hp=949390e681d18a784b6bd6652b6265078b2ffc4f;hpb=18f4aeffb1841f8b455a5e31811695102262a06a;p=ikiwiki.git diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 949390e68..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."), @@ -359,6 +359,8 @@ sub cgi (;$$) { } } + # goto is the preferred name for this; recentchanges_link and + # commenter are for compatibility with any saved URLs if ($do eq 'goto' || $do eq 'recentchanges_link' || $do eq 'commenter') { cgi_goto($q);