chiark / gitweb /
wip fixes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 9 Jan 2013 16:35:01 +0000 (16:35 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 9 Jan 2013 16:35:01 +0000 (16:35 +0000)
cgi-auth-hybrid.pm
test.cgi

index d945fae..fff16b7 100644 (file)
@@ -183,6 +183,7 @@ sub new_verifier {
            gen_login_form => \&gen_plain_login_form,
            gen_login_link => \&gen_plain_login_link,
            gettext => sub { gettext($_[2]); },
+           print => sub { print $_[2] or die $!; },
        },
        Dbh => undef,
     };
@@ -663,7 +664,8 @@ sub check_ok ($) {
        die $kind;
     }
 
-    $r->_print($r->_ch('gen_start_html',$title),
+    $r->_print($r->{Cgi}->header('text/html'),
+              $r->_ch('gen_start_html',$title),
               @body,
               $r->_ch('gen_end_html'));
     return 0;
index 6cb320e..59b7976 100755 (executable)
--- a/test.cgi
+++ b/test.cgi
@@ -19,7 +19,7 @@ my $q = CGI->new;
 
 my $authreq = $verifier->new_request($q);
 
-$authreq->check_ok() or return;
+$authreq->check_ok() or exit;
 
 my $cookie = $authreq->secret_cookie();
 my $url = $q->url();