X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=login.cgi;h=6a3254716b02732d341e3c0d8fcbe2f8a8085163;hb=295f9baecdce2ac043eaf41833094b0435d932aa;hp=0058aa9f9c25f68e98cdcad310c0f9dc48bc68e5;hpb=be1495662e4a4404faa46a81befb2dbf30a794cd;p=mirror%2Fuserdir-ldap-cgi.git diff --git a/login.cgi b/login.cgi index 0058aa9..6a32547 100755 --- a/login.cgi +++ b/login.cgi @@ -1,7 +1,8 @@ #!/usr/bin/perl -# $Id: login.cgi,v 1.8 2003/03/13 04:25:56 rmurray Exp $ +# $Id: login.cgi,v 1.10 2006/12/22 08:58:50 rmurray Exp $ # (c) 1999 Randolph Chung. Licensed under the GPL. +# (c) 2006 Ryan Murray. Licensed under the GPL. use lib '.'; use strict; @@ -18,7 +19,7 @@ my $query = new CGI; my $proto = ($ENV{HTTPS} ? "https" : "http"); if ($proto eq "http" || !($query->param('username')) || !($query->param('password'))) { - print "Location: https://$ENV{SERVER_NAME}/$config{webloginurl}\n\n"; + print "Location: https://$ENV{SERVER_NAME}/$config{webloginhtml}\n\n"; exit; } @@ -68,7 +69,7 @@ if ($mesg->code == LDAP_SUCCESS) { $ldap->unbind; } else { - print "Content-type: text/html\n\n"; + print "Content-type: text/html; charset=utf-8\n\n"; print "

Not authenticated

\n"; }