minor changes for testing
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
10
api.php
10
api.php
@@ -54,11 +54,13 @@ exit();
|
||||
*/
|
||||
function json_response($status, $status_message = '', $data = null)
|
||||
{
|
||||
$resheader = $_SERVER["SERVER_PROTOCOL"] . " " . $status;
|
||||
if (! empty($status_message)) {
|
||||
$resheader .= ' ' . str_replace("\n", " ", $status_message);
|
||||
if (isset($_SERVER["SERVER_PROTOCOL"]) && ! empty($_SERVER["SERVER_PROTOCOL"])) {
|
||||
$resheader = $_SERVER["SERVER_PROTOCOL"] . " " . $status;
|
||||
if (! empty($status_message)) {
|
||||
$resheader .= ' ' . str_replace("\n", " ", $status_message);
|
||||
}
|
||||
header($resheader);
|
||||
}
|
||||
header($resheader);
|
||||
|
||||
$response['status'] = $status;
|
||||
$response['status_message'] = $status_message;
|
||||
|
||||
Reference in New Issue
Block a user