diff options
Diffstat (limited to 'authtoken.json')
-rwxr-xr-x | authtoken.json | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/authtoken.json b/authtoken.json index 2db49de..1f0c415 100755 --- a/authtoken.json +++ b/authtoken.json @@ -5,6 +5,10 @@ use File::Basename; use lib dirname( __FILE__ ) . '/lib'; use rddb; +binmode(STDIN, ":utf8"); +binmode(STDOUT, ":utf8"); +binmode(STDERR, ":utf8"); + my $status = 'ERROR'; my $errorstring = 'unknown'; my $username = ''; @@ -22,7 +26,7 @@ if(defined $ENV{REMOTE_USER}) { $errorstring = 'no username defined - are you logged in?'; } -print "Content-type: application/json\n\n"; +print "Content-type: application/json; charset=UTF-8\n\n"; print "{\n"; print ' "status": "' . $status . '"'. ",\n"; |