]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
linkmap: Add option to omit disconnected pages from the map.
[ikiwiki.git] / IkiWiki / CGI.pm
index 9277223f00e8e8d0f30071e7b47462db54cd5e55..866711a719478cd7bde8a0fb8ecdfc44e8678ef9 100644 (file)
@@ -235,11 +235,15 @@ sub cgi_prefs ($$) {
        showform($form, $buttons, $session, $q);
 }
 
-sub cgi_custom_failure ($$) {
-       my $header=shift;
+sub cgi_custom_failure ($$$) {
+       my $q=shift;
+       my $httpstatus=shift;
        my $message=shift;
 
-       print $header;
+       print $q->header(
+               -status => $httpstatus,
+               -charset => 'utf-8',
+       );
        print $message;
 
        # Internet Explod^Hrer won't show custom 404 responses
@@ -274,7 +278,7 @@ sub check_banned ($$) {
                $session->delete();
                cgi_savesession($session);
                cgi_custom_failure(
-                       $q->header(-status => "403 Forbidden"),
+                       $q, "403 Forbidden",
                        gettext("You are banned."));
        }
 }