From 58a8cf83a95cbd3106201bb594e1de33bd0b8ef9 Mon Sep 17 00:00:00 2001 From: Jonas Haraldsson Date: Tue, 8 Oct 2013 21:07:14 +0200 Subject: [PATCH] change content-type for json Now using application/json; charset=utf-8 --- nixtape/2.0/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixtape/2.0/index.php b/nixtape/2.0/index.php index e2e2089a..8728cfa5 100644 --- a/nixtape/2.0/index.php +++ b/nixtape/2.0/index.php @@ -973,7 +973,7 @@ function method_radio_tune() { $stationurl = 'http://libre.fm'; if ($_REQUEST['format'] == 'json') { - header('Content-Type: text/javascript'); + header('Content-Type: application/json; charset=utf-8'); $json_data = array('station' => array('type' => $stationtype, 'name' => $stationname, 'url' => $stationurl, 'supportsdiscovery' => 1)); print(json_encode($json_data)); } else { @@ -1057,7 +1057,7 @@ function method_radio_getPlaylist() { 'track' => $tracks) ); - header('Content-Type: text/javascript'); + header('Content-Type: application/json; charset=utf-8'); print(json_encode($playlist)); }else{ //we return XSPF playlists by default @@ -1677,7 +1677,7 @@ function xml_response($xml) { } function json_response($data) { - header('Content-Type: text/javascript'); + header('Content-Type: application/json; charset=utf-8'); if ($_REQUEST['callback']) { print($_REQUEST['callback'] . '(' . $data . ');'); } else { -- GitLab