From 35c5a5a3a99277e6651fbc12392dd15aa7530002 Mon Sep 17 00:00:00 2001 From: Chris Down Date: Sun, 1 Sep 2013 16:36:51 +0200 Subject: Specify charset in Content-Type header when returning JSON data from API. Signed-off-by: Lukas Fleischer --- web/lib/aurjson.class.php | 1 + 1 file changed, 1 insertion(+) (limited to 'web/lib/aurjson.class.php') diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php index b905275..4364e5d 100644 --- a/web/lib/aurjson.class.php +++ b/web/lib/aurjson.class.php @@ -43,6 +43,7 @@ class AurJSON { // overwrite cache-control header set in aur.inc to allow caching, but // require validation header('Cache-Control: public, must-revalidate, max-age=0'); + header('Content-Type: application/json, charset=utf-8'); // handle error states if ( !isset($http_data['type']) || !isset($http_data['arg']) ) { -- cgit v1.2.3-54-g00ecf