use text/json content-type in a few more places
This commit is contained in:
parent
12f317822d
commit
7d1a91d56c
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
if (!init_connection($link)) return;
|
if (!init_connection($link)) return;
|
||||||
|
|
||||||
header("Content-Type: text/plain; charset=utf-8");
|
header("Content-Type: text/json; charset=utf-8");
|
||||||
|
|
||||||
if (ENABLE_GZIP_OUTPUT && function_exists("ob_gzhandler")) {
|
if (ENABLE_GZIP_OUTPUT && function_exists("ob_gzhandler")) {
|
||||||
ob_start("ob_gzhandler");
|
ob_start("ob_gzhandler");
|
||||||
|
@ -135,19 +135,19 @@
|
||||||
$handler->after();
|
$handler->after();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
header("Content-Type: text/plain");
|
header("Content-Type: text/json");
|
||||||
print json_encode(array("error" => array("code" => 6)));
|
print json_encode(array("error" => array("code" => 6)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
header("Content-Type: text/plain");
|
header("Content-Type: text/json");
|
||||||
print json_encode(array("error" => array("code" => 6)));
|
print json_encode(array("error" => array("code" => 6)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header("Content-Type: text/plain");
|
header("Content-Type: text/json");
|
||||||
print json_encode(array("error" => array("code" => 7)));
|
print json_encode(array("error" => array("code" => 7)));
|
||||||
|
|
||||||
// We close the connection to database.
|
// We close the connection to database.
|
||||||
|
|
Loading…
Reference in New Issue