summaryrefslogtreecommitdiff
path: root/rh-bin
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2016-06-27 23:08:15 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2016-06-27 23:08:15 (GMT)
commitd5d29c8889a9dc655044a1cf0926c1ac892b6696 (patch)
treea73ddad8bad0cf275e11886dac20e19bb6935522 /rh-bin
parentdd5cd12cafa71f5d757642aec25c65dcceb3d02c (diff)
parent03af1fed48370ddc4772709207f064c16191f5c1 (diff)
Merge branch 'master' of ssh://git@git.helsinki.at:2342/rhwebimport.git
Diffstat (limited to 'rh-bin')
-rwxr-xr-xrh-bin/authtoken.json6
1 files changed, 4 insertions, 2 deletions
diff --git a/rh-bin/authtoken.json b/rh-bin/authtoken.json
index 9e4c332..13a73d3 100755
--- a/rh-bin/authtoken.json
+++ b/rh-bin/authtoken.json
@@ -23,7 +23,7 @@
use strict;
use RHRD::rddb;
-use JSON;
+use JSON::MaybeXS;
my $status = 'ERROR';
my $errorstring = 'unknown';
@@ -57,6 +57,8 @@ $answer{'username'} = $username;
$answer{'fullname'} = $fullname;
$answer{'token'} = $token;
+my $j = JSON::MaybeXS->new(utf8 => 0);
+
print "Content-type: application/json; charset=UTF-8\n";
print "Status: $responsecode\n\n";
-print JSON->new->encode(\%answer);
+print $j->encode(\%answer);