sub redirect ($$) {
my $q=shift;
- my $url=shift;
+ eval q{use URI};
+ my $url=URI->new(shift);
if (! $config{w3mmode}) {
print $q->redirect($url);
}
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
$session->delete();
cgi_savesession($session);
cgi_custom_failure(
- $q->header(-status => "403 Forbidden"),
+ $q, "403 Forbidden",
gettext("You are banned."));
}
}