mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-14 09:58:16 +01:00
adapted to updated spec using action=capabilities
This commit is contained in:
parent
0d5ae0e2c2
commit
19f25f2012
@ -189,7 +189,9 @@ class ischedule_client
|
|||||||
array(
|
array(
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'header' => $header_string,
|
'header' => $header_string,
|
||||||
//'timeout' => $timeout, // max timeout in seconds
|
'user_agent' => 'EGroupware iSchedule client '.$GLOBALS['egw_info']['server']['versions']['phpgwapi'].' $Id$',
|
||||||
|
//'follow_location' => 1, // default 1=follow
|
||||||
|
//'timeout' => $timeout, // max timeout in seconds (float)
|
||||||
'content' => $content,
|
'content' => $content,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -252,7 +254,7 @@ class ischedule_client
|
|||||||
if (!isset($this->capabilities))
|
if (!isset($this->capabilities))
|
||||||
{
|
{
|
||||||
$reader = new XMLReader();
|
$reader = new XMLReader();
|
||||||
if (!$reader->open($this->url.'?query=capabilities'))
|
if (!$reader->open($this->url.'?action=capabilities'))
|
||||||
{
|
{
|
||||||
throw new Exception("Could not read iSchedule server capabilities $this->url!");
|
throw new Exception("Could not read iSchedule server capabilities $this->url!");
|
||||||
}
|
}
|
||||||
|
@ -377,9 +377,9 @@ class ischedule_server
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Serve an iSchedule GET request, currently only query=capabilities
|
* Serve an iSchedule GET request, currently only action=capabilities
|
||||||
*
|
*
|
||||||
* GET /.well-known/ischedule?query=capabilities HTTP/1.1
|
* GET /.well-known/ischedule?action=capabilities HTTP/1.1
|
||||||
* Host: cal.example.com
|
* Host: cal.example.com
|
||||||
*
|
*
|
||||||
* HTTP/1.1 200 OK
|
* HTTP/1.1 200 OK
|
||||||
@ -426,9 +426,9 @@ class ischedule_server
|
|||||||
*/
|
*/
|
||||||
protected function get()
|
protected function get()
|
||||||
{
|
{
|
||||||
if (!isset($_GET['query']) || $_GET['query'] !== 'capabilities')
|
if (!isset($_GET['query']) || $_GET['action'] !== 'capabilities')
|
||||||
{
|
{
|
||||||
error_log(__METHOD__."() invalid iSchedule request using GET without query=capabilities!");
|
error_log(__METHOD__."() invalid iSchedule request using GET without action=capabilities!");
|
||||||
header("HTTP/1.1 400 Bad Request");
|
header("HTTP/1.1 400 Bad Request");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user