summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-05-11 13:45:09 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-05-11 13:45:09 (GMT)
commit1338103170bf4b2b116f0a0134db86459c176f9a (patch)
tree04d9937d444697d422cfdc26c3d07cd43fd9b151
parentcd9721306a975793fb81dc136e5016f3309bd0de (diff)
moved to JSON::MaybeXS
-rw-r--r--README2
-rwxr-xr-xrh-bin/authtoken.json6
2 files changed, 5 insertions, 3 deletions
diff --git a/README b/README
index f5ede27..79db43c 100644
--- a/README
+++ b/README
@@ -31,7 +31,7 @@ LICENSE
Installation
============
-# sudo aptitude install apache2 libapache2-mpm-itk libapache2-mod-perl2 libjson-any-perl libxml-quote-perl librhrd-perl libjs-jquery libjs-bootstrap rivendell-server
+# sudo aptitude install apache2 libapache2-mpm-itk libapache2-mod-perl2 libjson-maybexs-perl libxml-quote-perl librhrd-perl libjs-jquery libjs-bootstrap rivendell-server
# sudo a2enmod ssl authnz_ldap perl proxy_wstunnel
# sudo /etc/init.d/apache2 restart
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);