3dbg_error_log(
'well-known',
'iSchedule requested' );
5require_once(
'HTTPAuthSession.php');
6$c->allow_unauthenticated =
true;
9if ( ! isset ( $request ) ) {
10 require_once(
'CalDAVRequest.php');
15switch ( $request->path ) {
16 case '/.well-known/caldav':
17 case '/.well-known/carddav':
18 header(
'Location: ' . $c->protocol_server_port . ConstructURL(
'/',
true) );
19 $request->DoResponse(301);
21 case '/.well-known/timezone':
23 foreach( $_GET as $k => $v ) {
24 $parameters .= ($parameters ==
'' ?
'?' :
'&' );
25 $parameters .= $k.
'='.rawurlencode($v);
27 header(
'Location: ' . $c->protocol_server_port . str_replace(
'/caldav.php',
'', ConstructURL(
'/tz.php',
true)).$parameters );
28 $request->DoResponse(301);
34if ( $c->enable_scheduling !=
true )
36 $request->DoResponse( 404, translate(
'The application program does not understand that request.') );
39dbg_error_log(
'well-known',
'method: ' . $request->method );
40switch ( $request->method ) {
46 include(
'iSchedule-POST.php');
50 dbg_error_log(
'well-known',
'Unhandled request method >>%s<<', $request->method );
51 dbg_log_array(
'well-known',
'_SERVER', $_SERVER,
true );
52 dbg_error_log(
'well-known',
'RAW: %s', str_replace(
"\n",
'',str_replace(
"\r",
'', $request->raw_post)) );
55$request->DoResponse( 500, translate(
'The application program does not understand that request.') );
61function ischedule_get ( )
64 if ( $request->path !=
'/.well-known/ischedule' || $_GET[
'query'] !=
'capabilities' )
66 $request->DoResponse( 404, translate(
'The application program does not understand that request.' . $request->path ) );
69 header (
'iSchedule-Version: 1.0' );
70 header (
'Content-Type: application/xml; charset=utf-8' );
71 echo
'<?xml version="1.0" encoding="utf-8" ?>';
73 <query-result xmlns=
"urn:ietf:params:xml:ns:ischedule">
75 <supported-version-
set>
76 <version>1.0</version>
77 </supported-version-
set>
78 <supported-scheduling-message-
set>
80 <method name=
"REQUEST"/>
82 <method name=
"REPLY"/>
83 <method name=
"CANCEL"/>
86 <comp name=
"VFREEBUSY"/>
87 </supported-scheduling-message-
set>
88 <supported-calendar-data-type>
89 <calendar-data-type content-type=
"text/calendar" version=
"2.0"/>
90 </supported-calendar-data-type>
91 <supported-attachment-values>
93 </supported-attachment-values>
94 <supported-recipient-uri-scheme-
set>
95 <scheme>mailto</scheme>
96 </supported-recipient-uri-scheme-
set>
97 <max-content-length>102400</max-content-length>
98 <min-date-time>19910101T000000Z</min-date-time>
99 <max-date-time>20381231T000000Z</max-date-time>
100 <max-instances>150</max-instances>
101 <max-recipients>250</max-recipients>
105 echo
' <administrator>mailto:' . $c->admin_email .
'</administrator>' .
"\n";
111 @ob_flush(); exit(0);