mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-07-27 12:59:54 +00:00
Handle /principals/*/user requests as Depth: 0 on principal
This commit is contained in:
parent
5265ed496f
commit
c97c489a52
@ -1,3 +1,7 @@
|
||||
2009-09-11 Andrew McMillan <andrew@morphoss.com>
|
||||
* Add support for /principals/user/username so iPhone (& possibly
|
||||
also iCal) users have a simpler setup experience.
|
||||
|
||||
2009-09-05 Andrew McMillan <andrew@morphoss.com>
|
||||
* Fix call-time pass by reference warnings.
|
||||
|
||||
|
||||
@ -132,6 +132,11 @@ class CalDAVPrincipal
|
||||
if ( !isset($usr) || !is_object($usr) ) return false;
|
||||
|
||||
$this->InitialiseRecord($usr);
|
||||
|
||||
if ( is_array($parameters) && isset($parameters['path']) && preg_match('#^/principals/#', $parameters['path']) ) {
|
||||
// Force it to match
|
||||
$this->url = $parameters['path'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -148,15 +153,15 @@ class CalDAVPrincipal
|
||||
if ( !isset($this->created) ) $this->created = ISODateToHTTPDate($this->joined);
|
||||
|
||||
$this->by_email = false;
|
||||
$this->url = ConstructURL( "/".$this->username."/" );
|
||||
$this->url = ConstructURL( "/".$this->username."/", true );
|
||||
|
||||
$this->calendar_home_set = array( $this->url );
|
||||
|
||||
$this->user_address_set = array(
|
||||
"mailto:".$this->email,
|
||||
ConstructURL( "/".$this->username."/" ),
|
||||
// ConstructURL( "/~".$this->username."/" ),
|
||||
// ConstructURL( "/__uuids__/".$this->username."/" ),
|
||||
ConstructURL( "/".$this->username."/", true ),
|
||||
// ConstructURL( "/~".$this->username."/", true ),
|
||||
// ConstructURL( "/__uuids__/".$this->username."/", true ),
|
||||
);
|
||||
$this->schedule_inbox_url = sprintf( "%s.in/", $this->url);
|
||||
$this->schedule_outbox_url = sprintf( "%s.out/", $this->url);
|
||||
@ -167,7 +172,7 @@ class CalDAVPrincipal
|
||||
$qry = new PgQuery("SELECT * FROM relationship LEFT JOIN usr ON (from_user = usr.user_no) LEFT JOIN role_member ON (to_user = role_member.user_no) LEFT JOIN roles USING (role_no) WHERE to_user = ? AND role_name = 'Group';", $this->user_no );
|
||||
if ( $qry->Exec("CalDAVPrincipal") && $qry->rows > 0 ) {
|
||||
while( $membership = $qry->Fetch() ) {
|
||||
$this->group_member_set[] = ConstructURL( "/". $membership->username . "/");
|
||||
$this->group_member_set[] = ConstructURL( "/". $membership->username . "/", true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -175,7 +180,7 @@ class CalDAVPrincipal
|
||||
$qry = new PgQuery("SELECT * FROM relationship LEFT JOIN usr ON (to_user = user_no) LEFT JOIN role_member USING (user_no) LEFT JOIN roles USING (role_no) WHERE from_user = ? AND role_name = 'Group';", $this->user_no );
|
||||
if ( $qry->Exec("CalDAVPrincipal") && $qry->rows > 0 ) {
|
||||
while( $membership = $qry->Fetch() ) {
|
||||
$this->group_membership[] = ConstructURL( "/". $membership->username . "/");
|
||||
$this->group_membership[] = ConstructURL( "/". $membership->username . "/", true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,17 +204,17 @@ class CalDAVPrincipal
|
||||
if ($relationship->confers == "R") {
|
||||
if ($relationship->from_user_no == $this->user_no) {
|
||||
// spec says without trailing slash, CalServ does it with slash, and so do we.
|
||||
$this->group_membership[] = ConstructURL( "/". $relationship->to_username . "/calendar-proxy-read/");
|
||||
$this->read_proxy_for[] = ConstructURL( "/". $relationship->to_username . "/");
|
||||
$this->group_membership[] = ConstructURL( "/". $relationship->to_username . "/calendar-proxy-read/", true);
|
||||
$this->read_proxy_for[] = ConstructURL( "/". $relationship->to_username . "/", true);
|
||||
} else /* ($relationship->to_user_no == $this->user_no) */ {
|
||||
$this->read_proxy_group[] = ConstructURL( "/". $relationship->from_username . "/");
|
||||
$this->read_proxy_group[] = ConstructURL( "/". $relationship->from_username . "/", true);
|
||||
}
|
||||
} else if (preg_match("/[WA]/", $relationship->confers)) {
|
||||
if ($relationship->from_user_no == $this->user_no) {
|
||||
$this->group_membership[] = ConstructURL( "/". $relationship->to_username . "/calendar-proxy-write/");
|
||||
$this->write_proxy_for[] = ConstructURL( "/". $relationship->to_username . "/");
|
||||
$this->group_membership[] = ConstructURL( "/". $relationship->to_username . "/calendar-proxy-write/", true);
|
||||
$this->write_proxy_for[] = ConstructURL( "/". $relationship->to_username . "/", true);
|
||||
} else /* ($relationship->to_user_no == $this->user_no) */ {
|
||||
$this->write_proxy_group[] = ConstructURL( "/". $relationship->from_username . "/");
|
||||
$this->write_proxy_group[] = ConstructURL( "/". $relationship->from_username . "/", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -224,7 +229,7 @@ class CalDAVPrincipal
|
||||
$this->calendar_free_busy_set = array();
|
||||
if( $qry->Exec("CalDAVPrincipal",__LINE__,__FILE__) && $qry->rows > 0 ) {
|
||||
while( $calendar = $qry->Fetch() ) {
|
||||
$this->calendar_free_busy_set[] = ConstructURL($calendar->dav_name);
|
||||
$this->calendar_free_busy_set[] = ConstructURL($calendar->dav_name, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,6 +254,7 @@ class CalDAVPrincipal
|
||||
@dbg_error_log( "principal", "Path split into at least /// %s /// %s /// %s", $path_split[1], $path_split[2], $path_split[3] );
|
||||
|
||||
$username = $path_split[1];
|
||||
if ( $path_split[1] == 'principals' ) $username = $path_split[3];
|
||||
if ( substr($username,0,1) == '~' ) $username = substr($username,1);
|
||||
|
||||
if ( isset($options['allow_by_email']) && $options['allow_by_email'] && preg_match( '#/(\S+@\S+[.]\S+)$#', $path, $matches) ) {
|
||||
|
||||
@ -186,13 +186,9 @@ class CalDAVRequest
|
||||
* 4. otherwise we query the defined relationships between users and use
|
||||
* the minimum privileges returned from that analysis.
|
||||
*/
|
||||
$this->path = (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : "");
|
||||
if ( $this->path == null || $this->path == '' ) {
|
||||
$this->path = '/';
|
||||
}
|
||||
else {
|
||||
$this->path = rawurldecode($this->path);
|
||||
}
|
||||
$this->path = (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : "/");
|
||||
$this->path = rawurldecode($this->path);
|
||||
|
||||
// dbg_error_log( "caldav", "Sanitising path '%s'", $this->path );
|
||||
$bad_chars_regex = '/[\\^\\[\\(\\\\]/';
|
||||
if ( preg_match( $bad_chars_regex, $this->path ) ) {
|
||||
@ -274,7 +270,7 @@ EOSQL;
|
||||
$this->collection_path = $this->path;
|
||||
$this->_is_principal = true;
|
||||
}
|
||||
else if ( preg_match( '#^(/[^/]+)/?$#', $this->path, $matches) ) {
|
||||
else if ( preg_match( '#^(/[^/]+)/?$#', $this->path, $matches) || preg_match( '#^(/principals/[^/]+/[^/]+)/?$#', $this->path, $matches) ) {
|
||||
$this->collection_id = -1;
|
||||
$this->collection_path = $matches[1].'/'; // Enforce trailling '/'
|
||||
$this->collection_type = 'principal';
|
||||
@ -284,6 +280,10 @@ EOSQL;
|
||||
dbg_error_log( "caldav", "Path is actually a collection - sending Content-Location header." );
|
||||
header( "Content-Location: ".ConstructURL($this->path) );
|
||||
}
|
||||
if ( preg_match( '#^(/principals/[^/]+/[^/]+)/?$#', $this->path, $matches) ) {
|
||||
// Force a depth of 0 on these, which are at the wrong URL.
|
||||
$this->depth = 0;
|
||||
}
|
||||
}
|
||||
else if ( $this->path == '/' ) {
|
||||
$this->collection_id = -1;
|
||||
@ -376,6 +376,8 @@ EOSQL;
|
||||
$this->user_no = $session->user_no;
|
||||
$this->username = $session->username;
|
||||
|
||||
@dbg_error_log( "WARN", "Call to deprecated CalDAVRequest::UserFromPath()" );
|
||||
|
||||
if ( $this->path == '/' || $this->path == '' ) {
|
||||
dbg_error_log( "caldav", "No useful path split possible" );
|
||||
return false;
|
||||
@ -383,6 +385,7 @@ EOSQL;
|
||||
|
||||
$path_split = explode('/', $this->path );
|
||||
$this->username = $path_split[1];
|
||||
if ( $this->username == 'principals' ) $this->username = $path_split[3];
|
||||
@dbg_error_log( "caldav", "Path split into at least /// %s /// %s /// %s", $path_split[1], $path_split[2], $path_split[3] );
|
||||
if ( isset($this->options['allow_by_email']) && preg_match( '#/(\S+@\S+[.]\S+)/?$#', $this->path, $matches) ) {
|
||||
$this->by_email = $matches[1];
|
||||
|
||||
@ -51,7 +51,9 @@ if ( !isset($_SERVER['SERVER_NAME']) ) {
|
||||
/**
|
||||
* Calculate the simplest form of reference to this page, excluding the PATH_INFO following the script name.
|
||||
*/
|
||||
$c->protocol_server_port_script = sprintf( "%s://%s%s%s", (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'? 'https' : 'http'), $_SERVER['SERVER_NAME'],
|
||||
$c->protocol_server_port_script = sprintf( "%s://%s%s%s",
|
||||
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'? 'https' : 'http'),
|
||||
$_SERVER['SERVER_NAME'],
|
||||
(
|
||||
( (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on') && $_SERVER['SERVER_PORT'] == 80 )
|
||||
|| (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' && $_SERVER['SERVER_PORT'] == 443 )
|
||||
@ -240,7 +242,7 @@ function getStatusMessage($status) {
|
||||
* except for any '/' characters in it.
|
||||
* @param string $partial_path The part of the path after the script name
|
||||
*/
|
||||
function ConstructURL( $partial_path ) {
|
||||
function ConstructURL( $partial_path, $force_script = false ) {
|
||||
global $c;
|
||||
|
||||
$partial_path = rawurlencode($partial_path);
|
||||
@ -251,9 +253,14 @@ function ConstructURL( $partial_path ) {
|
||||
$c->_url_script_path = $c->protocol_server_port_script . $c->_url_script_path;
|
||||
}
|
||||
|
||||
$url = $c->_url_script_path . $partial_path;
|
||||
$url = $c->_url_script_path;
|
||||
if ( $force_script ) {
|
||||
if ( ! preg_match( '#/caldav\.php$#', $url ) ) $url .= '/caldav.php';
|
||||
}
|
||||
$url .= $partial_path;
|
||||
$url = preg_replace( '#^(https?://.+)//#', '$1/', $url ); // Ensure we don't double any '/'
|
||||
$url = preg_replace('#^https?://[^/]+#', '', $url ); // Remove any protocol + hostname portion
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
@ -51,7 +51,9 @@ if ( !isset($_SERVER['SERVER_NAME']) ) {
|
||||
/**
|
||||
* Calculate the simplest form of reference to this page, excluding the PATH_INFO following the script name.
|
||||
*/
|
||||
$c->protocol_server_port_script = sprintf( "%s://%s%s%s", (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'? 'https' : 'http'), $_SERVER['SERVER_NAME'],
|
||||
$c->protocol_server_port_script = sprintf( "%s://%s%s%s",
|
||||
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'? 'https' : 'http'),
|
||||
$_SERVER['SERVER_NAME'],
|
||||
(
|
||||
( (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on') && $_SERVER['SERVER_PORT'] == 80 )
|
||||
|| (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' && $_SERVER['SERVER_PORT'] == 443 )
|
||||
@ -240,7 +242,7 @@ function getStatusMessage($status) {
|
||||
* except for any '/' characters in it.
|
||||
* @param string $partial_path The part of the path after the script name
|
||||
*/
|
||||
function ConstructURL( $partial_path ) {
|
||||
function ConstructURL( $partial_path, $force_script = false ) {
|
||||
global $c;
|
||||
|
||||
$partial_path = rawurlencode($partial_path);
|
||||
@ -251,9 +253,14 @@ function ConstructURL( $partial_path ) {
|
||||
$c->_url_script_path = $c->protocol_server_port_script . $c->_url_script_path;
|
||||
}
|
||||
|
||||
$url = $c->_url_script_path . $partial_path;
|
||||
$url = $c->_url_script_path;
|
||||
if ( $force_script ) {
|
||||
if ( ! preg_match( '#/caldav\.php$#', $url ) ) $url .= '/caldav.php';
|
||||
}
|
||||
$url .= $partial_path;
|
||||
$url = preg_replace( '#^(https?://.+)//#', '$1/', $url ); // Ensure we don't double any '/'
|
||||
$url = preg_replace('#^https?://[^/]+#', '', $url ); // Remove any protocol + hostname portion
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||
ETag: "f198ba2785d7ce129f5017d877e37a9b"
|
||||
Content-Length: 878
|
||||
ETag: "6a5ca17c5e140b8e593cf5fd51a10003"
|
||||
Content-Length: 922
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
@ -13,17 +13,17 @@ Content-Type: text/xml; charset="utf-8"
|
||||
<prop>
|
||||
<displayname>DAViCal CalDAV Server</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/user1/</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/user1/.in/</href>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/user1/.out/</href>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/user1/</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
|
||||
39
testing/tests/regression-suite/552-iPhone-PROPFIND.result
Normal file
39
testing/tests/regression-suite/552-iPhone-PROPFIND.result
Normal file
@ -0,0 +1,39 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||
ETag: "35e75c275075534433a2b68f9691ae20"
|
||||
Content-Length: 930
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:C1="http://calendarserver.org/ns/">
|
||||
<response>
|
||||
<href>/principals/users/user1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<displayname>User 1</displayname>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
32
testing/tests/regression-suite/552-iPhone-PROPFIND.test
Normal file
32
testing/tests/regression-suite/552-iPhone-PROPFIND.test
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Testing with a process similar to iPhone 3
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://mycaldav/principals/users/user1/
|
||||
HEAD
|
||||
|
||||
AUTH=user1:user1
|
||||
|
||||
HEADER=User-Agent: DAVKit/4.0 (728.3); iCalendar/1 (34); iPhone/3.0 7A341
|
||||
HEADER=Content-Type: text/xml
|
||||
|
||||
#
|
||||
# This query from the iPhone seems to discover several things. Firstly they
|
||||
# get the calendar-home-set URL for this path. Secondly, they ascertain
|
||||
# whether the calendar supports scheduling, and finally, whether it
|
||||
# handles some Apple-specific extensions.
|
||||
#
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<x0:propfind xmlns:x2="http://calendarserver.org/ns/" xmlns:x1="urn:ietf:params:xml:ns:caldav" xmlns:x0="DAV:">
|
||||
<x0:prop>
|
||||
<x1:calendar-home-set/>
|
||||
<x1:calendar-user-address-set/>
|
||||
<x1:schedule-inbox-URL/>
|
||||
<x1:schedule-outbox-URL/>
|
||||
<x2:dropbox-home-URL/>
|
||||
<x2:notifications-URL/>
|
||||
<x0:displayname/>
|
||||
</x0:prop>
|
||||
</x0:propfind>
|
||||
ENDDATA
|
||||
141
testing/tests/regression-suite/553-iPhone-PROPFIND.result
Normal file
141
testing/tests/regression-suite/553-iPhone-PROPFIND.result
Normal file
@ -0,0 +1,141 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||
ETag: "6fce1097fe68f06e745b40b2067552c9"
|
||||
Content-Length: 3027
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:A="http://apple.com/ns/ical/">
|
||||
<response>
|
||||
<href>/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:supported-calendar-component-set>
|
||||
<C:comp name="VEVENT"/>
|
||||
<C:comp name="VTODO"/>
|
||||
<C:comp name="VJOURNAL"/>
|
||||
<C:comp name="VTIMEZONE"/>
|
||||
<C:comp name="VFREEBUSY"/>
|
||||
</C:supported-calendar-component-set>
|
||||
<resourcetype>
|
||||
<collection/>
|
||||
</resourcetype>
|
||||
<displayname>DAViCal CalDAV Server</displayname>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:calendar-description/>
|
||||
<A:calendar-color/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>User 1</displayname>
|
||||
<resourcetype>
|
||||
<principal/>
|
||||
<collection/>
|
||||
</resourcetype>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:supported-calendar-component-set/>
|
||||
<C:calendar-description/>
|
||||
<A:calendar-color/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/manager1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Manager 1</displayname>
|
||||
<resourcetype>
|
||||
<principal/>
|
||||
<collection/>
|
||||
</resourcetype>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:supported-calendar-component-set/>
|
||||
<C:calendar-description/>
|
||||
<A:calendar-color/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/assistant1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Assistant 1</displayname>
|
||||
<resourcetype>
|
||||
<principal/>
|
||||
<collection/>
|
||||
</resourcetype>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:supported-calendar-component-set/>
|
||||
<C:calendar-description/>
|
||||
<A:calendar-color/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/resource1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Resource 1</displayname>
|
||||
<resourcetype>
|
||||
<principal/>
|
||||
<collection/>
|
||||
</resourcetype>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:supported-calendar-component-set/>
|
||||
<C:calendar-description/>
|
||||
<A:calendar-color/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/resource2/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Resource 2</displayname>
|
||||
<resourcetype>
|
||||
<principal/>
|
||||
<collection/>
|
||||
</resourcetype>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:supported-calendar-component-set/>
|
||||
<C:calendar-description/>
|
||||
<A:calendar-color/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
31
testing/tests/regression-suite/553-iPhone-PROPFIND.test
Normal file
31
testing/tests/regression-suite/553-iPhone-PROPFIND.test
Normal file
@ -0,0 +1,31 @@
|
||||
#
|
||||
# Testing with a process similar to iPhone 3
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://mycaldav/
|
||||
HEAD
|
||||
|
||||
AUTH=user1:user1
|
||||
|
||||
HEADER=User-Agent: DAVKit/4.0 (728.3); iCalendar/1 (34); iPhone/3.0 7A341
|
||||
HEADER=Content-Type: text/xml
|
||||
HEADER=Depth: 1
|
||||
|
||||
#
|
||||
# This query from the iPhone seems to discover several things. Firstly they
|
||||
# get the calendar-home-set URL for this path. Secondly, they ascertain
|
||||
# whether the calendar supports scheduling, and finally, whether it
|
||||
# handles some Apple-specific extensions.
|
||||
#
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<x0:propfind xmlns:x1="urn:ietf:params:xml:ns:caldav" xmlns:x0="DAV:" xmlns:x2="http://apple.com/ns/ical/">
|
||||
<x0:prop>
|
||||
<x0:displayname/>
|
||||
<x1:calendar-description/>
|
||||
<x1:supported-calendar-component-set/>
|
||||
<x2:calendar-color/>
|
||||
<x0:resourcetype/>
|
||||
</x0:prop>
|
||||
</x0:propfind>
|
||||
ENDDATA
|
||||
735
testing/tests/regression-suite/554-iPhone-PROPFIND.result
Normal file
735
testing/tests/regression-suite/554-iPhone-PROPFIND.result
Normal file
@ -0,0 +1,735 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||
ETag: "f31ea9144fd675f7b545ea397f934031"
|
||||
Transfer-Encoding: chunked
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:C1="http://calendarserver.org/ns/">
|
||||
<response>
|
||||
<href>/caldav.php/user1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<displayname>User 1</displayname>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>user1 home</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/0575d895-a006-4ed8-9be6-0d1b6b6b1f96.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Due 7/8/7 16:30, completed</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/1906b3ca-4890-468a-9b58-1de74bf2c716.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Private Event</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/20061101T073004Z.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>A Meeting</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/2178279a-aec2-471f-832d-1f6df6203f2f.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Incomplete, uncancelled</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Lunch with David</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Weekly Project Meeting</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/71e2ae82-7870-11db-c6d6-f6927c144649.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Beer O'Clock</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/917b9e47-b748-4550-a566-657fbe672447.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>50% Complete, uncancelled</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/9d050be7-8a02-4355-8ed3-02a9fc5f473f.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Confidential Event</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/AAA9318E-37D9-4319-8626-95ECD3D3B243.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>BBQ @ ML's</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/b1679f77-673d-4f46-b3eb-2420e1bba301.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>A Cancelled Task, with a start and due date</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/da81c0ee-7871-11db-c6d6-f6927c144649.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Morning Mgmt Mtg</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/e6eb5bc9-f7f9-4a0a-94e8-8e90eefc7d08.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Release 0.9.3</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/e70576e9-c1e0-431e-a507-0386fd82f223.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Morning Meeting</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/fbd57454-d966-4a14-8341-abe1edb1ae66.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Tentative Event</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/created/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>created</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>User 1 Inbox</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>User 1 Outbox</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>iCal Calendar</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/6C8A0D88-E1F9-4FC1-9EDD-DA258ABF2CFA.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Go to work</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/E6BC62F3-77C6-4FB7-BDD3-6882E2F1BE74.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>Celebrate a significant birthday</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/calendar-proxy-read/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>/user1/calendar-proxy-read/</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user1/calendar-proxy-write/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>/user1/calendar-proxy-write/</displayname>
|
||||
<C:calendar-home-set>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-home-set>
|
||||
<C:schedule-inbox-URL>
|
||||
<href>/caldav.php/user1/.in/</href>
|
||||
</C:schedule-inbox-URL>
|
||||
<C:schedule-outbox-URL>
|
||||
<href>/caldav.php/user1/.out/</href>
|
||||
</C:schedule-outbox-URL>
|
||||
<C:calendar-user-address-set>
|
||||
<href>mailto:user1@example.net</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
</C:calendar-user-address-set>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C1:dropbox-home-URL/>
|
||||
<C1:notifications-URL/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
32
testing/tests/regression-suite/554-iPhone-PROPFIND.test
Normal file
32
testing/tests/regression-suite/554-iPhone-PROPFIND.test
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Testing with a process similar to iPhone 3
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://mycaldav/caldav.php/user1/
|
||||
HEAD
|
||||
|
||||
AUTH=user1:user1
|
||||
|
||||
HEADER=User-Agent: DAVKit/4.0 (728.3); iCalendar/1 (34); iPhone/3.0 7A341
|
||||
HEADER=Content-Type: text/xml
|
||||
|
||||
#
|
||||
# This query from the iPhone seems to discover several things. Firstly they
|
||||
# get the calendar-home-set URL for this path. Secondly, they ascertain
|
||||
# whether the calendar supports scheduling, and finally, whether it
|
||||
# handles some Apple-specific extensions.
|
||||
#
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<x0:propfind xmlns:x2="http://calendarserver.org/ns/" xmlns:x1="urn:ietf:params:xml:ns:caldav" xmlns:x0="DAV:">
|
||||
<x0:prop>
|
||||
<x1:calendar-home-set/>
|
||||
<x1:calendar-user-address-set/>
|
||||
<x1:schedule-inbox-URL/>
|
||||
<x1:schedule-outbox-URL/>
|
||||
<x2:dropbox-home-URL/>
|
||||
<x2:notifications-URL/>
|
||||
<x0:displayname/>
|
||||
</x0:prop>
|
||||
</x0:propfind>
|
||||
ENDDATA
|
||||
@ -47,7 +47,7 @@
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/user1/</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<acl>
|
||||
@ -94,7 +94,7 @@
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/manager1/</href>
|
||||
<href>/caldav.php/manager1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<acl>
|
||||
@ -141,7 +141,7 @@
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/assistant1/</href>
|
||||
<href>/caldav.php/assistant1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<acl>
|
||||
@ -188,7 +188,7 @@
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/resource1/</href>
|
||||
<href>/caldav.php/resource1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<acl>
|
||||
@ -235,7 +235,7 @@
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/resource2/</href>
|
||||
<href>/caldav.php/resource2/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<acl>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:">
|
||||
<response>
|
||||
<href>/user1/</href>
|
||||
<href>/caldav.php/user1/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<acl>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user