mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
always send Content-Type: application/json
This commit is contained in:
parent
afdca98629
commit
fb87f5f173
@ -54,6 +54,7 @@ class ApiHandler extends Api\CalDAV\Handler
|
||||
$prefix = '/'.Api\Accounts::id2name($user);
|
||||
if (str_starts_with($path, $prefix)) $path = substr($path, strlen($prefix));
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
|
||||
try {
|
||||
if (str_starts_with($path, '/mail/attachments/'))
|
||||
@ -91,7 +92,6 @@ class ApiHandler extends Api\CalDAV\Handler
|
||||
}
|
||||
$push = new Api\Json\Push($user);
|
||||
$push->call('egw.open', '', 'mail', 'add', ['preset' => $preset], '_blank', 'mail');
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode([
|
||||
'status' => 200,
|
||||
'message' => 'Request to open compose window sent',
|
||||
@ -121,7 +121,6 @@ class ApiHandler extends Api\CalDAV\Handler
|
||||
]+$preset);
|
||||
if ($compose->send($preset, $acc_id))
|
||||
{
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(array_filter([
|
||||
'status' => 200,
|
||||
'warning' => $warning ?? null,
|
||||
@ -252,7 +251,6 @@ class ApiHandler extends Api\CalDAV\Handler
|
||||
{
|
||||
if (isset($fp)) fclose($fp);
|
||||
header('Location: '.($location = '/mail/attachments/'.substr(basename($attachment_path), 8)));
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode([
|
||||
'status' => 200,
|
||||
'message' => 'Attachment stored',
|
||||
|
Loading…
Reference in New Issue
Block a user