From f3cf86741cb9e2e66dfa5a74219279ddb5b7c5e0 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 08:41:00 +0200 Subject: [PATCH 01/29] Fix handling of .well-known where the base handler is not caldav.php --- htdocs/well-known.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/well-known.php b/htdocs/well-known.php index e44b0db1..588de822 100644 --- a/htdocs/well-known.php +++ b/htdocs/well-known.php @@ -21,7 +21,7 @@ switch ( $request->path ) { $request->DoResponse(301); // Moved permanently // does not return. case '/.well-known/timezone': - header('Location: ' . ConstructURL('/tz.php',true) ); + header('Location: ' . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)) ); $request->DoResponse(301); // Moved permanently // does not return. } From f01e6f5eb5d2be52542d93ae22fc54e59479073b Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 08:41:27 +0200 Subject: [PATCH 02/29] If we didn't actually GET an action, don't have an ugly PHP error. --- htdocs/tz.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/tz.php b/htdocs/tz.php index a744e644..b985b20f 100644 --- a/htdocs/tz.php +++ b/htdocs/tz.php @@ -26,7 +26,7 @@ $request = new CalDAVRequest(); $code_file = sprintf( 'tz/%s.php', $action ); if ( ! @include_once( $code_file ) ) { - $request->PreconditionFailed(400, "supported-action", 'The action "'.$_GET['action'].'" is not understood.' ); + $request->PreconditionFailed(400, "supported-action", 'The action "'.$action.'" is not understood.' ); } $request->DoResponse( 500, translate("The application failed to understand that request.") ); From 72c25cf79944ed8a1255266117d577787499de22 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 08:53:32 +0200 Subject: [PATCH 03/29] Pass through any GET parameters on the .well-known/timezone URL. --- htdocs/well-known.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/well-known.php b/htdocs/well-known.php index 588de822..2b71addf 100644 --- a/htdocs/well-known.php +++ b/htdocs/well-known.php @@ -21,7 +21,12 @@ switch ( $request->path ) { $request->DoResponse(301); // Moved permanently // does not return. case '/.well-known/timezone': - header('Location: ' . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)) ); + $parameters = ''; + foreach( $_GET as $k => $v ) { + $parameters .= ($parameters == '' ? '?' : '&' ); + $parameters .= $k.'='.rawurlencode($v); + } + header('Location: ' . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)).$parameters ); $request->DoResponse(301); // Moved permanently // does not return. } From 5077ca16af77501304ac129f9cffe0c4148ee1f9 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 09:09:44 +0200 Subject: [PATCH 04/29] Add a content-disposition header. --- inc/tz/get.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/tz/get.php b/inc/tz/get.php index 21146849..a89c22fc 100644 --- a/inc/tz/get.php +++ b/inc/tz/get.php @@ -45,6 +45,8 @@ if ( $qry->QDo('SELECT * FROM tz_localnames WHERE our_tzno = :our_tzno', array(' header( 'ETag: "'.$tz->etag.'"' ); header( 'Last-Modified', $tz->last_modified ); +header( 'Content-Disposition', $tzid . '.ics' ); + $request->DoResponse(200, $vtz->Render(), 'text/calendar'); From dd08c6f8904cb08a1c7944201e2b7ccb55d9484b Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 09:17:54 +0200 Subject: [PATCH 05/29] Fix Content-Disposition. --- inc/tz/get.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/tz/get.php b/inc/tz/get.php index a89c22fc..f8847c64 100644 --- a/inc/tz/get.php +++ b/inc/tz/get.php @@ -45,9 +45,8 @@ if ( $qry->QDo('SELECT * FROM tz_localnames WHERE our_tzno = :our_tzno', array(' header( 'ETag: "'.$tz->etag.'"' ); header( 'Last-Modified', $tz->last_modified ); -header( 'Content-Disposition', $tzid . '.ics' ); +header( 'Content-Disposition', 'Attachment; Filename="'.str_replace('/','-',$tzid . '.ics"' ); - -$request->DoResponse(200, $vtz->Render(), 'text/calendar'); +$request->DoResponse(200, $vtz->Render(), 'text/calendar; charset=UTF-8'); exit(0); \ No newline at end of file From 04482d503368b6e9664b9ab86fafed15889279cd Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 09:19:03 +0200 Subject: [PATCH 06/29] Fix Content-Disposition. --- inc/tz/get.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/tz/get.php b/inc/tz/get.php index a89c22fc..7f3c05aa 100644 --- a/inc/tz/get.php +++ b/inc/tz/get.php @@ -45,9 +45,8 @@ if ( $qry->QDo('SELECT * FROM tz_localnames WHERE our_tzno = :our_tzno', array(' header( 'ETag: "'.$tz->etag.'"' ); header( 'Last-Modified', $tz->last_modified ); -header( 'Content-Disposition', $tzid . '.ics' ); +header( 'Content-Disposition', 'Attachment; Filename="'.str_replace('/','-',$tzid . '.ics"' )); - -$request->DoResponse(200, $vtz->Render(), 'text/calendar'); +$request->DoResponse(200, $vtz->Render(), 'text/calendar; charset=UTF-8'); exit(0); \ No newline at end of file From 6500f7313366a5a3ffb29f9e74222e0e2184c98a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 09:40:24 +0200 Subject: [PATCH 07/29] Add protocol://hostname onto location header per spec. --- htdocs/well-known.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/well-known.php b/htdocs/well-known.php index 2b71addf..64192d8e 100644 --- a/htdocs/well-known.php +++ b/htdocs/well-known.php @@ -17,7 +17,7 @@ if ( ! isset ( $request ) ) { switch ( $request->path ) { case '/.well-known/caldav': case '/.well-known/carddav': - header('Location: ' . ConstructURL('/',true) ); + header('Location: ' . $c->protocol_server_port . ConstructURL('/',true) ); $request->DoResponse(301); // Moved permanently // does not return. case '/.well-known/timezone': @@ -26,7 +26,7 @@ switch ( $request->path ) { $parameters .= ($parameters == '' ? '?' : '&' ); $parameters .= $k.'='.rawurlencode($v); } - header('Location: ' . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)).$parameters ); + header('Location: ' . $c->protocol_server_port . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)).$parameters ); $request->DoResponse(301); // Moved permanently // does not return. } From 850baa0dbfa7decf84f10236573eb1e86152a19e Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 09:41:00 +0200 Subject: [PATCH 08/29] Support gzip/deflate/compress encoding of incoming entity for PUT etc. --- inc/CalDAVRequest.php | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 8b0dec7b..4ee230fd 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -115,7 +115,33 @@ class CalDAVRequest if ( !isset($this->options['allow_by_email']) ) $this->options['allow_by_email'] = false; if ( !isset($c->raw_post) ) $c->raw_post = file_get_contents( 'php://input'); - $this->raw_post = $c->raw_post; + if ( isset($_SERVER['HTTP_CONTENT_ENCODING']) ) { + @dbg_error_log('caldav', 'Content-Encoding: %s', $_SERVER['HTTP_CONTENT_ENCODING'] ); + switch( $_SERVER['HTTP_CONTENT_ENCODING'] ) { + case 'gzip': + $this->raw_post = gzdecode($c->raw_post); + break; + case 'deflate': + $this->raw_post = gzinflate($c->raw_post); + break; + case 'compress': + $this->raw_post = gzuncompress($c->raw_post); + break; + default: + if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || isset($c->dbg['caldav'])) ) { + $fh = fopen('/tmp/raw_post','w'); + if ( $fh ) { + fwrite($fh,$request->raw_post); + fclose($fh); + } + } + $this->PreconditionFailed(402, 'content-encoding', 'This server does not presently support content encoded with "%s"', $_SERVER['HTTP_CONTENT_ENCODING']); + } + $c->raw_post = $this->raw_post; + } + else { + $this->raw_post = $c->raw_post; + } if ( isset($debugging) && isset($_GET['method']) ) { $_SERVER['REQUEST_METHOD'] = $_GET['method']; @@ -139,11 +165,6 @@ class CalDAVRequest } $this->user_agent = ((isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "Probably Mulberry")); - if ( isset($_SERVER['HTTP_CONTENT_ENCODING']) ) { - @dbg_error_log('caldav', 'Content-Encoding: %s', $_SERVER['HTTP_CONTENT_ENCODING']); - $this->PreconditionFailed(402, 'content-encoding', 'This server does not presently support encoded content.'); - } - /** * A variety of requests may set the "Depth" header to control recursion */ @@ -1091,11 +1112,11 @@ EOSQL; * @param string $precondition The namespaced precondition tag. * @param string $explanation An optional text explanation for the failure. */ - function PreconditionFailed( $status, $precondition, $explanation = '') { + function PreconditionFailed( $status, $precondition, $explanation = '', $xmlns='DAV:') { $xmldoc = sprintf(' - + <%s/>%s -', str_replace('DAV::', '', $precondition), $explanation ); +', $xmlns, str_replace($xmlns.':', '', $precondition), $explanation ); $this->DoResponse( $status, $xmldoc, 'text/xml; charset="utf-8"' ); exit(0); // Unecessary, but might clarify things From 46f0bd289a893793c52322cc15849568af9593d5 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 09:41:33 +0200 Subject: [PATCH 09/29] Errors in timezone protocol should be in timezone xmlns --- htdocs/tz.php | 2 +- inc/tz/expand.php | 2 +- inc/tz/get.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/tz.php b/htdocs/tz.php index b985b20f..8cbb4f28 100644 --- a/htdocs/tz.php +++ b/htdocs/tz.php @@ -26,7 +26,7 @@ $request = new CalDAVRequest(); $code_file = sprintf( 'tz/%s.php', $action ); if ( ! @include_once( $code_file ) ) { - $request->PreconditionFailed(400, "supported-action", 'The action "'.$action.'" is not understood.' ); + $request->PreconditionFailed(400, "supported-action", 'The action "'.$action.'" is not understood.', 'urn:ietf:params:xml:ns:timezone-service' ); } $request->DoResponse( 500, translate("The application failed to understand that request.") ); diff --git a/inc/tz/expand.php b/inc/tz/expand.php index 89a8c215..9a068132 100644 --- a/inc/tz/expand.php +++ b/inc/tz/expand.php @@ -14,7 +14,7 @@ require_once('RRule-v2.php'); if ( empty($format) ) $format = 'text/calendar'; if ( $format != 'text/calendar' ) { - $request->PreconditionFailed(403, 'supported-format', 'This server currently only supports text/calendar format.'); + $request->PreconditionFailed(403, 'supported-format', 'This server currently only supports text/calendar format.', 'urn:ietf:params:xml:ns:timezone-service' ); } if ( empty($start) ) $start = sprintf( '%04d-01-01', date('Y')); diff --git a/inc/tz/get.php b/inc/tz/get.php index 7f3c05aa..e7726f91 100644 --- a/inc/tz/get.php +++ b/inc/tz/get.php @@ -13,7 +13,7 @@ require_once('vCalendar.php'); if ( empty($format) ) $format = 'text/calendar'; if ( $format != 'text/calendar' ) { - $request->PreconditionFailed(403, 'supported-format', 'This server currently only supports text/calendar format.'); + $request->PreconditionFailed(403, 'supported-format', 'This server currently only supports text/calendar format.', 'urn:ietf:params:xml:ns:timezone-service'); } $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; From 3d598f290d44e3f4863294b9f30a65a186a1ccdb Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 21:03:52 +1300 Subject: [PATCH 10/29] Fix headers. --- inc/tz/get.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/tz/get.php b/inc/tz/get.php index 6b7b65fa..c5f83c16 100644 --- a/inc/tz/get.php +++ b/inc/tz/get.php @@ -44,8 +44,8 @@ if ( $qry->QDo('SELECT * FROM tz_localnames WHERE our_tzno = :our_tzno', array(' } header( 'ETag: "'.$tz->etag.'"' ); -header( 'Last-Modified', $tz->last_modified ); -header( 'Content-Disposition', 'Attachment; Filename="'.str_replace('/','-',$tzid . '.ics"' )); +header( 'Last-Modified: '. $tz->last_modified ); +header( 'Content-Disposition: Attachment; Filename="'.str_replace('/','-',$tzid . '.ics"' )); $request->DoResponse(200, $vtz->Render(), 'text/calendar; charset=UTF-8'); From e6ddf79f3e70b745b178076fff3afc6dd3c8bf13 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 10:54:52 +0200 Subject: [PATCH 11/29] Correct the last modified value for the timezone server. --- inc/tz/expand.php | 4 ++-- inc/tz/get.php | 4 ++-- inc/tz/list.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/tz/expand.php b/inc/tz/expand.php index 9a068132..5b8cdff6 100644 --- a/inc/tz/expand.php +++ b/inc/tz/expand.php @@ -21,14 +21,14 @@ if ( empty($start) ) $start = sprintf( '%04d-01-01', date('Y')); if ( empty($end) ) $end = sprintf( '%04d-12-31', date('Y') + 10); $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; -$sql .= 'to_char(last_modified AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; +$sql .= 'to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; $sql .= 'FROM timezones WHERE tzid=:tzid'; $params = array( ':tzid' => $tzid ); $qry = new AwlQuery($sql,$params); if ( !$qry->Exec() ) exit(1); if ( $qry->rows() < 1 ) { $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; - $sql .= 'to_char(last_modified AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; + $sql .= 'to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; $sql .= 'FROM timezones JOIN tz_aliases USING(our_tzno) WHERE tzalias=:tzid'; if ( !$qry->Exec() ) exit(1); if ( $qry->rows() < 1 ) $request->DoResponse(404); diff --git a/inc/tz/get.php b/inc/tz/get.php index c5f83c16..6317a988 100644 --- a/inc/tz/get.php +++ b/inc/tz/get.php @@ -17,14 +17,14 @@ if ( $format != 'text/calendar' ) { } $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; -$sql .= 'to_char(last_modified AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; +$sql .= 'to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; $sql .= 'FROM timezones WHERE tzid=:tzid'; $params = array( ':tzid' => $tzid ); $qry = new AwlQuery($sql,$params); if ( !$qry->Exec() ) exit(1); if ( $qry->rows() < 1 ) { $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; - $sql .= 'to_char(last_modified AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; + $sql .= 'to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; $sql .= 'FROM timezones JOIN tz_aliases USING(our_tzno) WHERE tzalias=:tzid'; if ( !$qry->Exec() ) exit(1); if ( $qry->rows() < 1 ) $request->DoResponse(404); diff --git a/inc/tz/list.php b/inc/tz/list.php index de935b4d..8bb4d1fb 100644 --- a/inc/tz/list.php +++ b/inc/tz/list.php @@ -15,7 +15,7 @@ $response = new XMLDocument( array("urn:ietf:params:xml:ns:timezone-service" => $tzlist = $response->NewXMLElement('timezone-list'); $tzlist->NewElement('dtstamp', gmdate('Y-m-d\TH:i:s\Z')); -$sql = 'SELECT our_tzno, tzid, active, to_char(last_modified AT TIME ZONE \'UTC\',\'YYYY-MM-DD\"T\"HH24:MI:SS"Z"\') AS last_modified, olson_name, vtimezone FROM timezones'; +$sql = 'SELECT our_tzno, tzid, active, to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'YYYY-MM-DD\"T\"HH24:MI:SS"Z"\') AS last_modified, olson_name, vtimezone FROM timezones'; $params = array(); $where = ''; if ( $returnall !== true ) { From 3559f6e932d413f538063e57bb209307e2684156 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 11:20:58 +0200 Subject: [PATCH 12/29] Fix the last_modified and dtstamp? Nearly? --- inc/tz/expand.php | 4 ++-- inc/tz/get.php | 4 ++-- inc/tz/list.php | 11 +++++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/inc/tz/expand.php b/inc/tz/expand.php index 5b8cdff6..329ac68d 100644 --- a/inc/tz/expand.php +++ b/inc/tz/expand.php @@ -21,14 +21,14 @@ if ( empty($start) ) $start = sprintf( '%04d-01-01', date('Y')); if ( empty($end) ) $end = sprintf( '%04d-12-31', date('Y') + 10); $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; -$sql .= 'to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; +$sql .= 'to_char(last_modified,\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; $sql .= 'FROM timezones WHERE tzid=:tzid'; $params = array( ':tzid' => $tzid ); $qry = new AwlQuery($sql,$params); if ( !$qry->Exec() ) exit(1); if ( $qry->rows() < 1 ) { $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; - $sql .= 'to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; + $sql .= 'to_char(last_modified,\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; $sql .= 'FROM timezones JOIN tz_aliases USING(our_tzno) WHERE tzalias=:tzid'; if ( !$qry->Exec() ) exit(1); if ( $qry->rows() < 1 ) $request->DoResponse(404); diff --git a/inc/tz/get.php b/inc/tz/get.php index 6317a988..13d0785e 100644 --- a/inc/tz/get.php +++ b/inc/tz/get.php @@ -17,14 +17,14 @@ if ( $format != 'text/calendar' ) { } $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; -$sql .= 'to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; +$sql .= 'to_char(last_modified,\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; $sql .= 'FROM timezones WHERE tzid=:tzid'; $params = array( ':tzid' => $tzid ); $qry = new AwlQuery($sql,$params); if ( !$qry->Exec() ) exit(1); if ( $qry->rows() < 1 ) { $sql = 'SELECT our_tzno, tzid, active, olson_name, vtimezone, etag, '; - $sql .= 'to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; + $sql .= 'to_char(last_modified,\'Dy, DD Mon IYYY HH24:MI:SS "GMT"\') AS last_modified '; $sql .= 'FROM timezones JOIN tz_aliases USING(our_tzno) WHERE tzalias=:tzid'; if ( !$qry->Exec() ) exit(1); if ( $qry->rows() < 1 ) $request->DoResponse(404); diff --git a/inc/tz/list.php b/inc/tz/list.php index 8bb4d1fb..705a1e0b 100644 --- a/inc/tz/list.php +++ b/inc/tz/list.php @@ -13,9 +13,16 @@ require_once('vComponent.php'); $response = new XMLDocument( array("urn:ietf:params:xml:ns:timezone-service" => "") ); $tzlist = $response->NewXMLElement('timezone-list'); -$tzlist->NewElement('dtstamp', gmdate('Y-m-d\TH:i:s\Z')); +$qry = new AwlQuery('SELECT to_char(max(last_modified),\'YYYY-MM-DD\"T\"HH24:MI:SS"Z"\') AS dtstamp FROM timezones'); +if ( $qry->Exec('tz/list',__LINE__,__FILE__) && $qry->rows() > 0 ) { + $row = $qry->Fetch(); + $tzlist->NewElement('dtstamp', $row->dtstamp); +} +else { + $tzlist->NewElement('dtstamp', gmdate('Y-m-d\TH:i:s\Z')); +} -$sql = 'SELECT our_tzno, tzid, active, to_char((last_modified::timestamp WITH TIME ZONE) AT TIME ZONE \'UTC\',\'YYYY-MM-DD\"T\"HH24:MI:SS"Z"\') AS last_modified, olson_name, vtimezone FROM timezones'; +$sql = 'SELECT our_tzno, tzid, active, to_char(last_modified,\'YYYY-MM-DD\"T\"HH24:MI:SS"Z"\') AS last_modified, olson_name, vtimezone FROM timezones'; $params = array(); $where = ''; if ( $returnall !== true ) { From fde9af2a0702a381fbe3bd08d0a66c3c8fc7a895 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 11:42:40 +0200 Subject: [PATCH 13/29] The changedsince or changesince parameter has an uncertain name. --- htdocs/tz.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/tz.php b/htdocs/tz.php index 8cbb4f28..3ec56171 100644 --- a/htdocs/tz.php +++ b/htdocs/tz.php @@ -14,7 +14,7 @@ $session = new PublicSession(); param_to_global('action','{[a-z_-]+}'); param_to_global('format','{[a-z]+/[a-zA-Z0-9.+_-]+}'); -param_to_global('changesince'); +param_to_global('changedsince','{.*}','changesince'); param_to_global('start'); param_to_global('end'); param_to_global('lang'); From 36d35410a21e5482c2fd308b2ee05e4e00abfbd8 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 11:42:59 +0200 Subject: [PATCH 14/29] Don't send an empty lang attribute. --- inc/tz/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/tz/list.php b/inc/tz/list.php index 705a1e0b..1ed307d7 100644 --- a/inc/tz/list.php +++ b/inc/tz/list.php @@ -74,7 +74,7 @@ if ( $qry->Exec('tz/list',__LINE__,__FILE__) && $qry->rows() > 0 ) { } } else { - $elements[] = new XMLElement('local-name', $tz->tzid, array( 'lang' => $lang ) ); + $elements[] = new XMLElement('local-name', $tz->tzid, ( empty($lang) ? null : array( 'lang' => $lang ) ) ); } $tzlist->NewElement('summary', $elements); } From 9860f6a01342c00be381d4a25526c20a02903b87 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 11:45:52 +0200 Subject: [PATCH 15/29] Expand also has a dtstamp that needs to be set correctly. --- inc/tz/expand.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inc/tz/expand.php b/inc/tz/expand.php index 329ac68d..9fe0edbf 100644 --- a/inc/tz/expand.php +++ b/inc/tz/expand.php @@ -163,7 +163,14 @@ $vtz = new vCalendar($tz->vtimezone); $response = new XMLDocument(array("urn:ietf:params:xml:ns:timezone-service" => "")); $timezones = $response->NewXMLElement('urn:ietf:params:xml:ns:timezone-service:timezones'); -$timezones->NewElement('dtstamp', gmdate('Y-m-d\TH:i:s\Z')); +$qry = new AwlQuery('SELECT to_char(max(last_modified),\'YYYY-MM-DD\"T\"HH24:MI:SS"Z"\') AS dtstamp FROM timezones'); +if ( $qry->Exec('tz/list',__LINE__,__FILE__) && $qry->rows() > 0 ) { + $row = $qry->Fetch(); + $timezones->NewElement('dtstamp', $row->dtstamp); +} +else { + $timezones->NewElement('dtstamp', gmdate('Y-m-d\TH:i:s\Z')); +} $from = new RepeatRuleDateTime($start); $until = new RepeatRuleDateTime($end); From 060eeb1b5479f09bc0b1a13a6d71f1887ad53d5b Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 11:47:59 +0200 Subject: [PATCH 16/29] changedsince is > not >= :-) --- inc/tz/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/tz/list.php b/inc/tz/list.php index 1ed307d7..b3b4c399 100644 --- a/inc/tz/list.php +++ b/inc/tz/list.php @@ -30,7 +30,7 @@ if ( $returnall !== true ) { } if ( !empty($changedsince) ) { if ( !empty($where) ) $where .= ' AND '; - $where .= 'last_modified >= :changedsince'; + $where .= 'last_modified > :changedsince'; $params[':changedsince'] = $changedsince; } if ( !empty($where)) $sql .= ' WHERE '.$where; From 7e5b6a28b6d4ac61b5554585db4eb35194b5f22d Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 16:59:32 +0200 Subject: [PATCH 17/29] We need to coalesce the last_modified data as well as the created. --- inc/caldav-PROPFIND.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php index d48cf855..1c7a93ba 100644 --- a/inc/caldav-PROPFIND.php +++ b/inc/caldav-PROPFIND.php @@ -198,7 +198,7 @@ function get_collection_contents( $depth, $collection, $parent_path = null ) { $sql = 'SELECT collection.*, principal.*, calendar_item.*, caldav_data.*, '; $sql .= "to_char(coalesce(calendar_item.created, caldav_data.created) at time zone 'GMT',$date_format) AS created, "; - $sql .= "to_char(last_modified at time zone 'GMT',$date_format) AS modified, "; + $sql .= "to_char(coalesce(calendar_item.last_modified, caldav_data.modified) at time zone 'GMT',$date_format) AS modified, "; $sql .= 'summary AS dav_displayname '; $sql .= 'FROM caldav_data LEFT JOIN calendar_item USING( dav_id, user_no, dav_name, collection_id) '; $sql .= 'LEFT JOIN collection USING(collection_id,user_no) LEFT JOIN principal USING(user_no) '; From 147abf71c6196688957ad1efe2ee80ce6416deb4 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 17:00:37 +0200 Subject: [PATCH 18/29] When we create a timezone on PUT we should set the last_modified. Ideally from the LAST-MODIFIED property in the VTIMEZONE, but failing that we should at least use the gmdate() of the current time. --- inc/caldav-PUT-functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index 1d94b1e0..37825de9 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -566,7 +566,11 @@ EOSQL; if ( $qry->Exec('PUT',__LINE__,__FILE__) && $qry->rows() == 0 ) { $params[':olson_name'] = $olson; $params[':vtimezone'] = (isset($tz) ? $tz->Render() : null ); - $qry->QDo('INSERT INTO timezones (tzid, olson_name, active, vtimezone) VALUES(:tzid,:olson_name,false,:vtimezone)', $params ); + $params[':last_modified'] = (isset($tz) ? $tz->GetPValue('LAST-MODIFIED') : null ); + if ( empty($params[':last_modified']) ) { + $params[':last_modified'] = gmdate('Ymd\THis\Z'); + } + $qry->QDo('INSERT INTO timezones (tzid, olson_name, active, vtimezone, last_modified) VALUES(:tzid,:olson_name,false,:vtimezone,:last_modified)', $params ); } } else { From 3a4269136c8c381dd6b0095b58e11558e3633beb Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 17:01:10 +0200 Subject: [PATCH 19/29] Implement support for proposed tzid parameter on list requests. --- inc/tz/list.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/tz/list.php b/inc/tz/list.php index b3b4c399..74075c8f 100644 --- a/inc/tz/list.php +++ b/inc/tz/list.php @@ -33,6 +33,11 @@ if ( !empty($changedsince) ) { $where .= 'last_modified > :changedsince'; $params[':changedsince'] = $changedsince; } +if ( !empty($tzid) ) { + if ( !empty($where) ) $where .= ' AND '; + $where .= '(tzid = :tzid OR our_tzno IN (SELECT our_tzno FROM tz_aliases WHERE tzalias = :tzid))'; + $params[':tzid'] = $tzid; +} if ( !empty($where)) $sql .= ' WHERE '.$where; if ( !empty($c->strict_result_ordering) && $c->strict_result_ordering ) { From 7b93f913db21954ed9b5d4b0b1621b670e16201e Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 08:07:59 +0200 Subject: [PATCH 20/29] Set limits & defaults on lock duration. --- inc/caldav-LOCK.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/caldav-LOCK.php b/inc/caldav-LOCK.php index 92d75d82..0ef832ab 100644 --- a/inc/caldav-LOCK.php +++ b/inc/caldav-LOCK.php @@ -114,6 +114,9 @@ if ( $request->method == "LOCK" ) { * A fresh lock */ $lock_token = uuid(); + $lock_timeout = (empty($request->timeout) ? 30 : intval($request->timeout) ); + if ( $lock_timeout < 1 ) $lock_timeout = 30; + else if ( $lock_timeout > 300 ) $lock_timeout = 300; $sql = 'INSERT INTO locks ( dav_name, opaquelocktoken, type, scope, depth, owner, timeout, start ) VALUES( :dav_name, :lock_token, :type, :scope, :request_depth, :owner, :timeout::interval, current_timestamp )'; $params = array( @@ -123,7 +126,7 @@ if ( $request->method == "LOCK" ) { ':scope' => $lockinfo['scope'], ':request_depth' => $request->depth, ':owner' => $lockinfo['owner'], - ':timeout' => $request->timeout.' seconds' + ':timeout' => $lock_timeout.' seconds' ); header( "Lock-Token: " ); } From 0db1fed1dec6941a7e71473d251ccbbd1d9b9f9f Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 11:05:15 +0200 Subject: [PATCH 21/29] Fix handling where supplied content-type header is busted. --- htdocs/caldav.php | 1 - inc/CalDAVRequest.php | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/caldav.php b/htdocs/caldav.php index a44ab79b..2083fb6f 100644 --- a/htdocs/caldav.php +++ b/htdocs/caldav.php @@ -110,7 +110,6 @@ switch ( $request->method ) { case 'HEAD': include('caldav-GET.php'); break; case 'PROPPATCH': include('caldav-PROPPATCH.php'); break; case 'PUT': - $request->CoerceContentType(); switch( $request->content_type ) { case 'text/calendar': include('caldav-PUT-vcalendar.php'); diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 4ee230fd..1eecbec0 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -162,6 +162,9 @@ class CalDAVRequest $this->content_type = 'text/xml'; } } + else if ( $this->method == 'PUT' || $this->method == 'POST' ) { + $this->CoerceContentType(); + } } $this->user_agent = ((isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "Probably Mulberry")); @@ -840,7 +843,11 @@ EOSQL; if ( isset($this->content_type) ) { $type = explode( '/', $this->content_type, 2); /** @todo: Perhaps we should look at the target collection type, also. */ - if ( $type[0] == 'text' ) return; + if ( $type[0] == 'text' ) { + if ( !empty($type[2]) && ($type[2] == 'vcard' || $type[2] == 'calendar' || $type[2] == 'x-vcard') ) { + return; + } + } } /** Null (or peculiar) content-type supplied so we have to try and work it out... */ @@ -866,7 +873,7 @@ EOSQL; dbg_error_log( 'LOG NOTICE', 'Unusual content-type of "%s" and first word of content is "%s"', (isset($this->content_type)?$this->content_type:'(null)'), $first_word ); } - $this->content_type = 'text/plain'; + if ( empty($this->content_type) ) $this->content_type = 'text/plain'; } From f7edceeaa85ce5f3cf6896e89a71018aff126f54 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 11:05:44 +0200 Subject: [PATCH 22/29] Fix regression in lock handling. --- inc/caldav-LOCK.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/caldav-LOCK.php b/inc/caldav-LOCK.php index 0ef832ab..6ee2cfd8 100644 --- a/inc/caldav-LOCK.php +++ b/inc/caldav-LOCK.php @@ -105,6 +105,9 @@ $lock_opener = $request->FailIfLocked(); if ( $request->method == "LOCK" ) { dbg_error_log( "LOCK", "Attempting to lock resource '%s'", $request->path); + $lock_timeout = (empty($request->timeout) ? 30 : intval($request->timeout) ); + if ( $lock_timeout < 1 ) $lock_timeout = 30; + else if ( $lock_timeout > 300 ) $lock_timeout = 300; if ( ($lock_token = $request->IsLocked()) ) { // NOTE Assignment in if() is expected here. $sql = 'UPDATE locks SET start = current_timestamp WHERE opaquelocktoken = :lock_token'; $params = array( ':lock_token' => $lock_token); @@ -114,9 +117,6 @@ if ( $request->method == "LOCK" ) { * A fresh lock */ $lock_token = uuid(); - $lock_timeout = (empty($request->timeout) ? 30 : intval($request->timeout) ); - if ( $lock_timeout < 1 ) $lock_timeout = 30; - else if ( $lock_timeout > 300 ) $lock_timeout = 300; $sql = 'INSERT INTO locks ( dav_name, opaquelocktoken, type, scope, depth, owner, timeout, start ) VALUES( :dav_name, :lock_token, :type, :scope, :request_depth, :owner, :timeout::interval, current_timestamp )'; $params = array( @@ -139,7 +139,7 @@ if ( $request->method == "LOCK" ) { new XMLElement( 'lockscope', new XMLElement( $lock_row->scope )), new XMLElement( 'depth', $request->GetDepthName() ), new XMLElement( 'owner', new XMLElement( 'href', $lock_row->owner )), - new XMLElement( 'timeout', 'Second-'.$request->timeout), + new XMLElement( 'timeout', 'Second-'.$lock_timeout), new XMLElement( 'locktoken', new XMLElement( 'href', 'opaquelocktoken:'.$lock_token )) ); $response = new XMLElement("lockdiscovery", new XMLElement( "activelock", $activelock), array("xmlns" => "DAV:") ); From 3e1e8ef0314455611f6d327e3e2a85db503cae45 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 11:05:58 +0200 Subject: [PATCH 23/29] Correct error text. --- inc/caldav-PUT-vcard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/caldav-PUT-vcard.php b/inc/caldav-PUT-vcard.php index 546e6ab5..f46e279e 100644 --- a/inc/caldav-PUT-vcard.php +++ b/inc/caldav-PUT-vcard.php @@ -39,7 +39,7 @@ else { if ( ! isset($c->readonly_webdav_collections) || $c->readonly_webdav_collections ) { $request->PreconditionFailed(405,'method-not-allowed',translate('You may not PUT to a collection URL')); } - $request->DoResponse(403,translate('PUT on a collection is only allowed for text/calendar content against a calendar collection')); + $request->DoResponse(403,translate('PUT on a collection is only allowed for text/vcard content against an addressbook collection')); } $dest->NeedPrivilege('DAV::write-content'); } From 45c5e67993e6442997d2d83306f6dccc563df0f8 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 11:06:34 +0200 Subject: [PATCH 24/29] Get date identified as being UTC. --- scripts/tz-update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tz-update.php b/scripts/tz-update.php index 8ef49d70..16b570fb 100755 --- a/scripts/tz-update.php +++ b/scripts/tz-update.php @@ -159,7 +159,7 @@ if ( empty($c->tzsource) ) $c->tzsource = '../zonedb/vtimezones'; if ( preg_match('{^http}', $c->tzsource ) ) { $changesince = null; - $qry = new AwlQuery("SELECT tzid, to_char(last_modified,'YYYY-MM-DD\"T\"HH24:MI:SS') AS last_modified FROM timezones"); + $qry = new AwlQuery("SELECT tzid, to_char(last_modified,'YYYY-MM-DD\"T\"HH24:MI:SS\"Z\"') AS last_modified FROM timezones"); $current_zones = array(); if ( $qry->Exec('tz/updatecheck',__LINE__,__FILE__) && $qry->rows() > 0 ) { while( $row = $qry->Fetch() ) From 84a7ea115093d392bc97825d7a89b581e59a08e5 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 11:07:37 +0200 Subject: [PATCH 25/29] More tweaking of time-range query construction. And there will be further work on this too... --- inc/caldav-REPORT-calquery.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/inc/caldav-REPORT-calquery.php b/inc/caldav-REPORT-calquery.php index bc0826f4..311ba5e8 100644 --- a/inc/caldav-REPORT-calquery.php +++ b/inc/caldav-REPORT-calquery.php @@ -135,33 +135,31 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter = case 'urn:ietf:params:xml:ns:caldav:time-range': /** - * @todo We should probably allow time range queries against other properties, since eventually some client may want to do this. + * @todo We should probably allow time range queries against other properties, since + * eventually some client may want to do this. */ $start_column = ($components[sizeof($components)-1] == 'VTODO' ? "due" : 'dtend'); // The column we compare against the START attribute $finish_column = 'dtstart'; // The column we compare against the END attribute $start = $v->GetAttribute("start"); $finish = $v->GetAttribute("end"); -// if ( isset($start) || isset($finish) ) { -// $sql .= ' AND (rrule_event_overlaps( dtstart, dtend, rrule, :time_range_start, :time_range_end ) OR event_has_exceptions(caldav_data.caldav_data) ) '; -// $params[':time_range_start'] = $start; -// $params[':time_range_end'] = $finish; -// } $start_sql = $finish_sql = ''; if ( isset($start) ) { $params[':time_range_start'] = $start; - $start_sql .= ' ((dtend IS NULL AND dtstart > :time_range_start) OR dtend > :time_range_start) '; + $start_sql .= ' (('.$start_column.' IS NULL AND '.$finish_column.' > :time_range_start) OR '.$start_column.' > :time_range_start) '; } if ( isset($finish) ) { $params[':time_range_end'] = $finish; - $finish_sql = ' dtstart < :time_range_end '; + $finish_sql = ' '.$finish_column.' < :time_range_end '; } if ( isset($start) || isset($finish) ) { - $sql .= ' AND (rrule IS NOT NULL OR dtstart IS NULL OR ('; + $sql .= ' AND (rrule IS NOT NULL OR '.$finish_column.' IS NULL OR ('; if ( isset($start) ) $sql .= $start_sql; if ( isset($start) && isset($finish) ) $sql .= ' AND '; if ( isset($finish) ) $sql .= $finish_sql; $sql .= '))'; } + @dbg_error_log('calquery', 'filter-sql: %s', $sql); + @dbg_error_log('calquery', 'time-range-start: %s, time-range-end: %s, ', $params[':time_range_start'], $params[':time_range_end']); $need_range_filter = array(new RepeatRuleDateTime($start),new RepeatRuleDateTime($finish)); break; From d1f0a1cc768e4b65d44c0d5e5352627149cde428 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 11:10:02 +0200 Subject: [PATCH 26/29] New & variously improved regression tests. --- testing/tests/binding/1000-BIND.result | 2 +- testing/tests/binding/1001-BIND.result | 2 +- .../tests/binding/1004-PROPFIND-bound.result | 20 +- testing/tests/binding/1012-BIND.result | 4 +- testing/tests/binding/1022-BIND.result | 6 +- testing/tests/binding/1023-BIND.result | 8 +- testing/tests/binding/1024-BIND.result | 8 +- testing/tests/binding/1025-PROPFIND.result | 4 +- testing/tests/binding/1027-PROPFIND.result | 2 +- testing/tests/binding/1032-BIND-admin.result | 10 +- .../binding/1034-DELETE-admin-bind.result | 4 +- testing/tests/binding/1035-GET-mashup.result | 58 +- testing/tests/binding/1100-BIND.result | 12 +- .../tests/binding/1101-PROPFIND-normal.result | 6 +- .../tests/binding/1102-PROPFIND-bound.result | 6 +- testing/tests/binding/Restore-Database.result | 4 +- testing/tests/carddav/2001-PUT-fail.result | 4 +- .../2021-OPTIONS_well-known_carddav.result | 2 +- ...2-OPTIONS_well-known_carddav_noauth.result | 2 +- testing/tests/carddav/2025-PROPFIND.result | 33 + testing/tests/carddav/2025-PROPFIND.test | 25 + testing/tests/carddav/Restore-Database.result | 4 +- .../regression-suite/0003-Mulberry-1.result | 29 +- .../regression-suite/0005-Mulberry-1.result | 29 +- .../regression-suite/0104-Evo-PUT-1.test | 44 +- .../regression-suite/0240-Moz-PROPFIND.result | 29 +- .../0403-Cadaver-LOCK-1.result | 29 + .../regression-suite/0403-Cadaver-LOCK-1.test | 15 + .../0404-Cadaver-PUT-1.result | 0 ...3004Z.ics.data => 0404-Cadaver-PUT-1.test} | 28 +- .../0502-iCal-PROPFIND.result | 30 +- .../0503-iCal-PROPFIND.result | 4 +- .../0504-iCal-PROPFIND.result | 4 +- .../0522-iCal-PROPFIND.result | 31 +- .../0524-iCal-PROPFIND.result | 43 +- .../0532-iCal4-PROPFIND.result | 78 +- .../0536-iCal4-PROPFIND.result | 4 +- .../tests/regression-suite/0544-gzip-PUT.data | Bin 0 -> 429 bytes .../0544-iCLoud-PUT-encoded.result | 8 + .../0544-iCLoud-PUT-encoded.test | 14 + .../0553-iPhone-PROPFIND.result | 65 +- .../0554-iPhone-PROPFIND.result | 65 +- .../0555-iPhone-REPORT.result | 14 +- .../0558-iPhone-PROPFIND.result | 29 +- .../0598-REPORT-sync-initial.result | 15 +- .../0599-REPORT-sync-changed.result | 15 +- .../0602-Soho-PROPFIND.result | 48 +- .../0603-Soho-PROPFIND.result | 26 +- .../regression-suite/0800-Spec-LOCK-1.result | 4 +- .../regression-suite/0801-Spec-LOCK-1.result | 4 +- .../regression-suite/0810-Spec-LOCK-1.result | 4 +- .../regression-suite/0811-Spec-LOCK-1.result | 4 +- .../0822-Spec-PROPFIND-3.result | 41 +- .../regression-suite/0838-Spec-LOCK.result | 4 +- .../0840-Spec-PROPPATCH-1.result | 6 +- .../0840-Spec-PROPPATCH-1.test | 4 +- .../0850-Spec-REPORT-1.result | 19 +- .../0851-Spec-REPORT-1.result | 19 +- .../0901-GET-Collection.result | 60 +- .../0902-PUT-collection.result | 2 +- .../0912-Space-PROPFIND.result | 32 +- .../tests/regression-suite/0924-MOVE.result | 4 +- .../0941-GET-resource-denied.result | 13 +- .../tests/regression-suite/0965-GET.result | 41 + testing/tests/regression-suite/0965-GET.test | 20 + .../1100-REPORT-sync-changed.result | 16 +- .../tests/regression-suite/sample-data.sql | 9 + .../tests/scheduling/Restore-Database.result | 4 +- testing/tests/timezone/5010-list.result | 9 +- testing/tests/timezone/5021-list.result | 734 +++++++++--------- testing/tests/timezone/5030-get.result | 4 +- testing/tests/timezone/5031-get.result | 4 +- testing/tests/timezone/5032-get.result | 4 +- testing/tests/timezone/5033-get.result | 4 +- .../tests/timezone/Restore-Database.result | 4 +- 75 files changed, 1389 insertions(+), 606 deletions(-) create mode 100644 testing/tests/carddav/2025-PROPFIND.result create mode 100644 testing/tests/carddav/2025-PROPFIND.test create mode 100644 testing/tests/regression-suite/0403-Cadaver-LOCK-1.result create mode 100644 testing/tests/regression-suite/0403-Cadaver-LOCK-1.test create mode 100644 testing/tests/regression-suite/0404-Cadaver-PUT-1.result rename testing/tests/regression-suite/{20061101T073004Z.ics.data => 0404-Cadaver-PUT-1.test} (55%) create mode 100644 testing/tests/regression-suite/0544-gzip-PUT.data create mode 100644 testing/tests/regression-suite/0544-iCLoud-PUT-encoded.result create mode 100644 testing/tests/regression-suite/0544-iCLoud-PUT-encoded.test create mode 100644 testing/tests/regression-suite/0965-GET.result create mode 100644 testing/tests/regression-suite/0965-GET.test diff --git a/testing/tests/binding/1000-BIND.result b/testing/tests/binding/1000-BIND.result index 2cc207d0..353b0a8e 100644 --- a/testing/tests/binding/1000-BIND.result +++ b/testing/tests/binding/1000-BIND.result @@ -7,7 +7,7 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1599< + bind_id: >1601< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/user2/< diff --git a/testing/tests/binding/1001-BIND.result b/testing/tests/binding/1001-BIND.result index 7e800a33..f10b1248 100644 --- a/testing/tests/binding/1001-BIND.result +++ b/testing/tests/binding/1001-BIND.result @@ -9,7 +9,7 @@ Content-Type: text/xml; charset="utf-8" A resource already exists at the destination. - bind_id: >1599< + bind_id: >1601< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/user2/< diff --git a/testing/tests/binding/1004-PROPFIND-bound.result b/testing/tests/binding/1004-PROPFIND-bound.result index eb1bf1f8..d3717e62 100644 --- a/testing/tests/binding/1004-PROPFIND-bound.result +++ b/testing/tests/binding/1004-PROPFIND-bound.result @@ -58,6 +58,24 @@ HTTP/1.1 200 OK + + /caldav.php/user4/addresses/ + + + user4 addresses + + /caldav.php/.resources/63 + + + + /caldav.php + user4 + + + + HTTP/1.1 200 OK + + /caldav.php/user4/nz_holidays/ @@ -100,7 +118,7 @@ User 4 Outbox - /caldav.php/.resources/1597 + /caldav.php/.resources/1599 diff --git a/testing/tests/binding/1012-BIND.result b/testing/tests/binding/1012-BIND.result index ee7dc4d2..7edf19d9 100644 --- a/testing/tests/binding/1012-BIND.result +++ b/testing/tests/binding/1012-BIND.result @@ -7,14 +7,14 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1599< + bind_id: >1601< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< parent_container: >/user4/< ticket_id_length: >8< - bind_id: >1600< + bind_id: >1602< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< diff --git a/testing/tests/binding/1022-BIND.result b/testing/tests/binding/1022-BIND.result index 362d0921..e99edf0c 100644 --- a/testing/tests/binding/1022-BIND.result +++ b/testing/tests/binding/1022-BIND.result @@ -7,21 +7,21 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1599< + bind_id: >1601< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< length: >8< parent_container: >/user4/< - bind_id: >1600< + bind_id: >1602< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< length: >8< parent_container: >/user4/< - bind_id: >1604< + bind_id: >1606< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< diff --git a/testing/tests/binding/1023-BIND.result b/testing/tests/binding/1023-BIND.result index 10e55d4a..a843d9fb 100644 --- a/testing/tests/binding/1023-BIND.result +++ b/testing/tests/binding/1023-BIND.result @@ -7,28 +7,28 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1599< + bind_id: >1601< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< length: >8< parent_container: >/user4/< - bind_id: >1600< + bind_id: >1602< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< length: >8< parent_container: >/user4/< - bind_id: >1604< + bind_id: >1606< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< length: >8< parent_container: >/user4/base/< - bind_id: >1605< + bind_id: >1607< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/base/user2/< diff --git a/testing/tests/binding/1024-BIND.result b/testing/tests/binding/1024-BIND.result index 5804f0b2..0b71d540 100644 --- a/testing/tests/binding/1024-BIND.result +++ b/testing/tests/binding/1024-BIND.result @@ -9,28 +9,28 @@ Content-Type: text/xml; charset="utf-8" A resource already exists at the destination. - bind_id: >1599< + bind_id: >1601< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< length: >8< parent_container: >/user4/< - bind_id: >1600< + bind_id: >1602< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< length: >8< parent_container: >/user4/< - bind_id: >1604< + bind_id: >1606< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< length: >8< parent_container: >/user4/base/< - bind_id: >1605< + bind_id: >1607< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/base/user2/< diff --git a/testing/tests/binding/1025-PROPFIND.result b/testing/tests/binding/1025-PROPFIND.result index 9d72baa8..155d7f04 100644 --- a/testing/tests/binding/1025-PROPFIND.result +++ b/testing/tests/binding/1025-PROPFIND.result @@ -6,7 +6,7 @@ A normal collection - /caldav.php/.resources/1602 + /caldav.php/.resources/1604 @@ -90,7 +90,7 @@ A sub collection - /caldav.php/.resources/1603 + /caldav.php/.resources/1605 diff --git a/testing/tests/binding/1027-PROPFIND.result b/testing/tests/binding/1027-PROPFIND.result index 8a5cb22b..6d61d644 100644 --- a/testing/tests/binding/1027-PROPFIND.result +++ b/testing/tests/binding/1027-PROPFIND.result @@ -6,7 +6,7 @@ A normal collection - /caldav.php/.resources/1602 + /caldav.php/.resources/1604 diff --git a/testing/tests/binding/1032-BIND-admin.result b/testing/tests/binding/1032-BIND-admin.result index dc99c10e..6a3e155e 100644 --- a/testing/tests/binding/1032-BIND-admin.result +++ b/testing/tests/binding/1032-BIND-admin.result @@ -7,7 +7,7 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1599< + bind_id: >1601< bind_owner: >1005< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< @@ -19,7 +19,7 @@ target_collection: >11< target_resource_i: >NULL< ticket_owner: >1003< - bind_id: >1600< + bind_id: >1602< bind_owner: >1005< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< @@ -31,7 +31,7 @@ target_collection: >10< target_resource_i: >NULL< ticket_owner: >1002< - bind_id: >1604< + bind_id: >1606< bind_owner: >1005< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< @@ -43,7 +43,7 @@ target_collection: >10< target_resource_i: >NULL< ticket_owner: >1002< - bind_id: >1605< + bind_id: >1607< bind_owner: >1005< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< @@ -55,7 +55,7 @@ target_collection: >11< target_resource_i: >NULL< ticket_owner: >1003< - bind_id: >1626< + bind_id: >1628< bind_owner: >1< bound_source_id: >12< dav_displayname: >user3 home< diff --git a/testing/tests/binding/1034-DELETE-admin-bind.result b/testing/tests/binding/1034-DELETE-admin-bind.result index 9da37dd6..3bab3301 100644 --- a/testing/tests/binding/1034-DELETE-admin-bind.result +++ b/testing/tests/binding/1034-DELETE-admin-bind.result @@ -6,14 +6,14 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1604< + bind_id: >1606< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< dav_owner_id: >1005< parent_container: >/user4/base/< - bind_id: >1605< + bind_id: >1607< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/base/user2/< diff --git a/testing/tests/binding/1035-GET-mashup.result b/testing/tests/binding/1035-GET-mashup.result index 53cc151e..9d794fd3 100644 --- a/testing/tests/binding/1035-GET-mashup.result +++ b/testing/tests/binding/1035-GET-mashup.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -Content-Length: 21618 +Content-Length: 21698 Etag: "ae93907cb03bc025b8e733eb61f3a09e" Content-Type: text/calendar; charset="utf-8" @@ -108,13 +108,9 @@ END:VEVENT BEGIN:VEVENT UID:20061101T073000Z-10468-1000-1-7@ubu DTSTAMP:20061101T073000Z -DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland:20061 - 101T100000 -DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland:2006110 - 1T110000 -SUMMARY:A Meeting -X-EVOLUTION-CALDAV-HREF:http://user1@mycaldav/caldav.php/user1/home/2006 - 1101T073004Z.ics +DTSTART;TZID=Pacific/Auckland:20061101T100000 +DTEND;TZID=Pacific/Auckland:20061101T110000 +SUMMARY:A Changed Meeting BEGIN:VALARM X-EVOLUTION-ALARM-UID:20061101T073000Z-10480-1000-1-5@ubu ACTION:DISPLAY @@ -313,6 +309,16 @@ DTSTAMP:20091006T225808Z SEQUENCE:1 END:VEVENT BEGIN:VEVENT +CREATED:20111004T153507Z +UID:0544-gzip-PUT +TRANSP:OPAQUE +SUMMARY:In Central Europe, 2pm, Oct 5th for 1 hour +DTSTART;TZID=Somewhere_in_Central_Europe:20111005T140000 +DTEND;TZID=Somewhere_in_Central_Europe:20111005T150000 +DTSTAMP:20111004T153507Z +SEQUENCE:1 +END:VEVENT +BEGIN:VEVENT DESCRIPTION:Have a party. All the best parties are monthly! UID:DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74 DTSTAMP:20081024T220925Z @@ -618,24 +624,6 @@ TZOFFSETTO:+1200 END:STANDARD END:VTIMEZONE BEGIN:VTIMEZONE -TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland -X-LIC-LOCATION:Pacific/Auckland -BEGIN:STANDARD -TZOFFSETFROM:+1300 -TZOFFSETTO:+1200 -TZNAME:NZST -DTSTART:19700315T030000 -RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3 -END:STANDARD -BEGIN:DAYLIGHT -TZOFFSETFROM:+1200 -TZOFFSETTO:+1300 -TZNAME:NZDT -DTSTART:19701004T020000 -RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10 -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE TZID:/mozilla.org/20050126_1/Pacific/Auckland X-LIC-LOCATION:Pacific/Auckland BEGIN:STANDARD @@ -706,4 +694,22 @@ TZNAME:GMT+01:00 TZOFFSETTO:+0100 END:STANDARD END:VTIMEZONE +BEGIN:VTIMEZONE +TZID:Somewhere_in_Central_Europe +X-MICROSOFT-CDO-TZID:4 +BEGIN:DAYLIGHT +TZOFFSETFROM:+0100 +RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU +DTSTART:19810329T020000 +TZNAME:GMT+02:00 +TZOFFSETTO:+0200 +END:DAYLIGHT +BEGIN:STANDARD +TZOFFSETFROM:+0200 +RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU +DTSTART:19961027T030000 +TZNAME:GMT+01:00 +TZOFFSETTO:+0100 +END:STANDARD +END:VTIMEZONE END:VCALENDAR diff --git a/testing/tests/binding/1100-BIND.result b/testing/tests/binding/1100-BIND.result index 59bac120..b09a95e6 100644 --- a/testing/tests/binding/1100-BIND.result +++ b/testing/tests/binding/1100-BIND.result @@ -7,36 +7,36 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1599< + bind_id: >1601< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< length: >8< parent_container: >/user4/< - bind_id: >1600< + bind_id: >1602< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< length: >8< parent_container: >/user4/< - bind_id: >1604< + bind_id: >1606< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< length: >8< parent_container: >/user4/base/< - bind_id: >1605< + bind_id: >1607< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/base/user2/< length: >8< parent_container: >/user4/base/< - bind_id: >1627< - bound_source_id: >1602< + bind_id: >1629< + bound_source_id: >1604< dav_displayname: >A normal collection< dav_name: >/user4/boundbase/< length: >NULL< diff --git a/testing/tests/binding/1101-PROPFIND-normal.result b/testing/tests/binding/1101-PROPFIND-normal.result index de7df0fc..b542230b 100644 --- a/testing/tests/binding/1101-PROPFIND-normal.result +++ b/testing/tests/binding/1101-PROPFIND-normal.result @@ -6,7 +6,7 @@ A normal collection - /caldav.php/.resources/1602 + /caldav.php/.resources/1604 @@ -90,7 +90,7 @@ A sub collection - /caldav.php/.resources/1603 + /caldav.php/.resources/1605 @@ -112,7 +112,7 @@ newcalendar - /caldav.php/.resources/1616 + /caldav.php/.resources/1618 diff --git a/testing/tests/binding/1102-PROPFIND-bound.result b/testing/tests/binding/1102-PROPFIND-bound.result index a94f8c2b..70cdfcff 100644 --- a/testing/tests/binding/1102-PROPFIND-bound.result +++ b/testing/tests/binding/1102-PROPFIND-bound.result @@ -6,7 +6,7 @@ A normal collection - /caldav.php/.resources/1602 + /caldav.php/.resources/1604 @@ -99,7 +99,7 @@ A sub collection - /caldav.php/.resources/1603 + /caldav.php/.resources/1605 @@ -125,7 +125,7 @@ newcalendar - /caldav.php/.resources/1616 + /caldav.php/.resources/1618 diff --git a/testing/tests/binding/Restore-Database.result b/testing/tests/binding/Restore-Database.result index b2a8224a..9fbcd37f 100644 --- a/testing/tests/binding/Restore-Database.result +++ b/testing/tests/binding/Restore-Database.result @@ -1,6 +1,6 @@ setval -------- - 1598 + 1600 (1 row) setval @@ -30,7 +30,7 @@ setval -------- - 11 + 12 (1 row) setval diff --git a/testing/tests/carddav/2001-PUT-fail.result b/testing/tests/carddav/2001-PUT-fail.result index 9869a3a9..eaaf6c51 100644 --- a/testing/tests/carddav/2001-PUT-fail.result +++ b/testing/tests/carddav/2001-PUT-fail.result @@ -2,7 +2,7 @@ HTTP/1.1 403 Forbidden Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -Content-Length: 91 +Content-Length: 92 Content-Type: text/plain; charset="utf-8" -PUT on a collection is only allowed for text/calendar content against a calendar collection +PUT on a collection is only allowed for text/vcard content against an addressbook collection diff --git a/testing/tests/carddav/2021-OPTIONS_well-known_carddav.result b/testing/tests/carddav/2021-OPTIONS_well-known_carddav.result index 8a4a9e91..ef5913ab 100644 --- a/testing/tests/carddav/2021-OPTIONS_well-known_carddav.result +++ b/testing/tests/carddav/2021-OPTIONS_well-known_carddav.result @@ -1,6 +1,6 @@ HTTP/1.1 301 Moved Permanently Date: Dow, 01 Jan 2000 00:00:00 GMT -Location: /caldav.php/ +Location: http://mycaldav/caldav.php/ Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/carddav/2022-OPTIONS_well-known_carddav_noauth.result b/testing/tests/carddav/2022-OPTIONS_well-known_carddav_noauth.result index 8a4a9e91..ef5913ab 100644 --- a/testing/tests/carddav/2022-OPTIONS_well-known_carddav_noauth.result +++ b/testing/tests/carddav/2022-OPTIONS_well-known_carddav_noauth.result @@ -1,6 +1,6 @@ HTTP/1.1 301 Moved Permanently Date: Dow, 01 Jan 2000 00:00:00 GMT -Location: /caldav.php/ +Location: http://mycaldav/caldav.php/ Content-Length: 0 Content-Type: text/plain; charset="utf-8" diff --git a/testing/tests/carddav/2025-PROPFIND.result b/testing/tests/carddav/2025-PROPFIND.result new file mode 100644 index 00000000..01ae79c0 --- /dev/null +++ b/testing/tests/carddav/2025-PROPFIND.result @@ -0,0 +1,33 @@ +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 +DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule +ETag: "c407a846b30b1e658173c72fab664629" +Content-Length: 636 +Content-Type: text/xml; charset="utf-8" + + + + + /caldav.php/user3/addresses/ + + + Sun, 15 Mar 1998 12:00:00 GMT + + + + + + HTTP/1.1 200 OK + + + + + + + + + HTTP/1.1 404 Not Found + + + diff --git a/testing/tests/carddav/2025-PROPFIND.test b/testing/tests/carddav/2025-PROPFIND.test new file mode 100644 index 00000000..9b49ce46 --- /dev/null +++ b/testing/tests/carddav/2025-PROPFIND.test @@ -0,0 +1,25 @@ +# +# PROPFIND on addressbook resource +# +TYPE=PROPFIND +URL=http://regression.host/caldav.php/user3/addresses/ +HEADER=User-Agent: cadaver/0.23.3 neon/0.29.6 +HEADER=Content-Type: application/xml +HEADER=Depth: 1 +HEAD + +AUTH=user3:user3 + + +BEGINDATA + + + + + + + + + +ENDDATA + diff --git a/testing/tests/carddav/Restore-Database.result b/testing/tests/carddav/Restore-Database.result index 3f338b6a..5388b0a6 100644 --- a/testing/tests/carddav/Restore-Database.result +++ b/testing/tests/carddav/Restore-Database.result @@ -1,6 +1,6 @@ setval -------- - 1627 + 1629 (1 row) setval @@ -30,7 +30,7 @@ setval -------- - 11 + 12 (1 row) setval diff --git a/testing/tests/regression-suite/0003-Mulberry-1.result b/testing/tests/regression-suite/0003-Mulberry-1.result index 651ef35f..2939cf5f 100644 --- a/testing/tests/regression-suite/0003-Mulberry-1.result +++ b/testing/tests/regression-suite/0003-Mulberry-1.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "f7655907e64525c7ecaa409f800e8f8b" -Content-Length: 1805 +ETag: "6224e345c323da0dfc00689c21171119" +Content-Length: 2254 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ @@ -46,6 +46,25 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ + + + httpd/unix-directory + + + + + + HTTP/1.1 200 OK + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/calendar-proxy-read/ @@ -53,7 +72,7 @@ Content-Type: text/xml; charset="utf-8" httpd/unix-directory - + HTTP/1.1 200 OK @@ -72,7 +91,7 @@ Content-Type: text/xml; charset="utf-8" httpd/unix-directory - + HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0005-Mulberry-1.result b/testing/tests/regression-suite/0005-Mulberry-1.result index 5c3a790a..b258c068 100644 --- a/testing/tests/regression-suite/0005-Mulberry-1.result +++ b/testing/tests/regression-suite/0005-Mulberry-1.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "297a698b8d8c51217f0de910462dc6d8" -Content-Length: 2206 +ETag: "966d4f7d769690fca393be5ba814e8a2" +Content-Length: 2655 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ @@ -46,6 +46,25 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ + + + httpd/unix-directory + + + + + + HTTP/1.1 200 OK + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ @@ -72,7 +91,7 @@ Content-Type: text/xml; charset="utf-8" httpd/unix-directory - + HTTP/1.1 200 OK @@ -91,7 +110,7 @@ Content-Type: text/xml; charset="utf-8" httpd/unix-directory - + HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0104-Evo-PUT-1.test b/testing/tests/regression-suite/0104-Evo-PUT-1.test index 33c5c57c..3f962446 100644 --- a/testing/tests/regression-suite/0104-Evo-PUT-1.test +++ b/testing/tests/regression-suite/0104-Evo-PUT-1.test @@ -6,4 +6,46 @@ HEADER=If-None-Match: * HEADER=User-Agent: Evolution/1.8.1 HEADER=Content-Type: text/calendar HEAD -DATA=20061101T073004Z.ics + +BEGINDATA +BEGIN:VCALENDAR +CALSCALE:GREGORIAN +PRODID:-//Ximian//NONSGML Evolution Calendar//EN +VERSION:2.0 +BEGIN:VEVENT +UID:20061101T073000Z-10468-1000-1-7@ubu +DTSTAMP:20061101T073000Z +DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: + 20061101T100000 +DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: + 20061101T110000 +SUMMARY:A Meeting +X-EVOLUTION-CALDAV-HREF:http: + //user1@mycaldav/caldav.php/user1/home/20061101T073004Z.ics +BEGIN:VALARM +X-EVOLUTION-ALARM-UID:20061101T073000Z-10480-1000-1-5@ubu +ACTION:DISPLAY +TRIGGER;VALUE=DURATION;RELATED=START:-PT15M +DESCRIPTION:A Meeting +END:VALARM +END:VEVENT +BEGIN:VTIMEZONE +TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland +X-LIC-LOCATION:Pacific/Auckland +BEGIN:STANDARD +TZOFFSETFROM:+1300 +TZOFFSETTO:+1200 +TZNAME:NZST +DTSTART:19700315T030000 +RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3 +END:STANDARD +BEGIN:DAYLIGHT +TZOFFSETFROM:+1200 +TZOFFSETTO:+1300 +TZNAME:NZDT +DTSTART:19701004T020000 +RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10 +END:DAYLIGHT +END:VTIMEZONE +END:VCALENDAR +ENDDATA diff --git a/testing/tests/regression-suite/0240-Moz-PROPFIND.result b/testing/tests/regression-suite/0240-Moz-PROPFIND.result index 171c15b7..f0e6d11f 100644 --- a/testing/tests/regression-suite/0240-Moz-PROPFIND.result +++ b/testing/tests/regression-suite/0240-Moz-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "929672a83aec9ab7d7b4a85c61814772" -Content-Length: 2161 +ETag: "fd17acf5fe9ad6e6612323ef680b3d10" +Content-Length: 2601 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ @@ -46,6 +46,25 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ + + + httpd/unix-directory + + + + + + HTTP/1.1 200 OK + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ @@ -72,7 +91,7 @@ Content-Type: text/xml; charset="utf-8" httpd/unix-directory - + HTTP/1.1 200 OK @@ -91,7 +110,7 @@ Content-Type: text/xml; charset="utf-8" httpd/unix-directory - + HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0403-Cadaver-LOCK-1.result b/testing/tests/regression-suite/0403-Cadaver-LOCK-1.result new file mode 100644 index 00000000..cd6deb3e --- /dev/null +++ b/testing/tests/regression-suite/0403-Cadaver-LOCK-1.result @@ -0,0 +1,29 @@ +HTTP/1.1 200 OK +Date: Dow, 01 Jan 2000 00:00:00 GMT +DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule +DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule +Lock-Token: +Content-Length: 412 +Content-Type: text/xml; charset="utf-8" + + + + + + + + + + + + 0 + + + + Second-30 + + opaquelocktoken:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + + + + diff --git a/testing/tests/regression-suite/0403-Cadaver-LOCK-1.test b/testing/tests/regression-suite/0403-Cadaver-LOCK-1.test new file mode 100644 index 00000000..2e039acf --- /dev/null +++ b/testing/tests/regression-suite/0403-Cadaver-LOCK-1.test @@ -0,0 +1,15 @@ +# +# Basic testing with Cadaver DAV client +# +TYPE=LOCK +URL=http://mycaldav/caldav.php/user1/home/20061101T073004Z.ics +HEADER=User-Agent: cadaver/0.23.3 neon/0.29.6 +HEADER=Depth: 0 +HEADER=Content-Type: application/xml +HEAD + +BEGINDATA + + + +ENDDATA diff --git a/testing/tests/regression-suite/0404-Cadaver-PUT-1.result b/testing/tests/regression-suite/0404-Cadaver-PUT-1.result new file mode 100644 index 00000000..e69de29b diff --git a/testing/tests/regression-suite/20061101T073004Z.ics.data b/testing/tests/regression-suite/0404-Cadaver-PUT-1.test similarity index 55% rename from testing/tests/regression-suite/20061101T073004Z.ics.data rename to testing/tests/regression-suite/0404-Cadaver-PUT-1.test index 21b884cb..0740b6a3 100644 --- a/testing/tests/regression-suite/20061101T073004Z.ics.data +++ b/testing/tests/regression-suite/0404-Cadaver-PUT-1.test @@ -1,3 +1,17 @@ +# +# Doing a PUT with cadaver +# +TYPE=PUT +URL=http://regression.host/caldav.php/user1/home/20061101T073004Z.ics + +GETSQL=locktoken +SELECT opaquelocktoken FROM locks WHERE dav_name = '/user1/home/20061101T073004Z.ics' +ENDSQL + +HEADER=User-Agent: cadaver/0.22.3 neon/0.25.5 +HEADER=If: () + +BEGINDATA BEGIN:VCALENDAR CALSCALE:GREGORIAN PRODID:-//Ximian//NONSGML Evolution Calendar//EN @@ -5,13 +19,9 @@ VERSION:2.0 BEGIN:VEVENT UID:20061101T073000Z-10468-1000-1-7@ubu DTSTAMP:20061101T073000Z -DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: - 20061101T100000 -DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: - 20061101T110000 -SUMMARY:A Meeting -X-EVOLUTION-CALDAV-HREF:http: - //user1@mycaldav/caldav.php/user1/home/20061101T073004Z.ics +DTSTART;TZID=Pacific/Auckland:20061101T100000 +DTEND;TZID=Pacific/Auckland:20061101T110000 +SUMMARY:A Changed Meeting BEGIN:VALARM X-EVOLUTION-ALARM-UID:20061101T073000Z-10480-1000-1-5@ubu ACTION:DISPLAY @@ -20,8 +30,7 @@ DESCRIPTION:A Meeting END:VALARM END:VEVENT BEGIN:VTIMEZONE -TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland -X-LIC-LOCATION:Pacific/Auckland +TZID:Pacific/Auckland BEGIN:STANDARD TZOFFSETFROM:+1300 TZOFFSETTO:+1200 @@ -38,3 +47,4 @@ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10 END:DAYLIGHT END:VTIMEZONE END:VCALENDAR +ENDDATA diff --git a/testing/tests/regression-suite/0502-iCal-PROPFIND.result b/testing/tests/regression-suite/0502-iCal-PROPFIND.result index 60963c75..1be2bf46 100644 --- a/testing/tests/regression-suite/0502-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0502-iCal-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "3d57f5e85f8e7d0fe3398eeace49ce1a" -Content-Length: 3181 +ETag: "e3f59c55883b61b4390fd7ffbe74644b" +Content-Length: 3649 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ @@ -48,6 +48,26 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ + + + user1 addresses + + + + + + HTTP/1.1 200 OK + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ @@ -115,7 +135,7 @@ Content-Type: text/xml; charset="utf-8" /user1/calendar-proxy-read/ - + HTTP/1.1 200 OK @@ -135,7 +155,7 @@ Content-Type: text/xml; charset="utf-8" /user1/calendar-proxy-write/ - + HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0503-iCal-PROPFIND.result b/testing/tests/regression-suite/0503-iCal-PROPFIND.result index 737b96be..8324b6c6 100644 --- a/testing/tests/regression-suite/0503-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0503-iCal-PROPFIND.result @@ -2,7 +2,7 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "c30ae7a73f7f3c95895032994b51554d" +ETag: "e76f1252cff440810b604e3903cc364b" Content-Length: 675 Content-Type: text/xml; charset="utf-8" @@ -13,7 +13,7 @@ Content-Type: text/xml; charset="utf-8" user1 home - "c4b202f2177d8839c95d715f26cf62da" + "86d97f6156e59bbf1b1514e804a6cc1c" diff --git a/testing/tests/regression-suite/0504-iCal-PROPFIND.result b/testing/tests/regression-suite/0504-iCal-PROPFIND.result index a9a82e00..9257c0d9 100644 --- a/testing/tests/regression-suite/0504-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0504-iCal-PROPFIND.result @@ -2,7 +2,7 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "c0dc924dbe52600ea776c98136f289b0" +ETag: "198df454dbf27f8311378759dfeaee14" Content-Length: 4155 Content-Type: text/xml; charset="utf-8" @@ -40,7 +40,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/20061101T073004Z.ics - "c3658901fd4689d4a1e1d6f08601ef4f" + "bcc402382688cb3e8e57379c757dbcb0" HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0522-iCal-PROPFIND.result b/testing/tests/regression-suite/0522-iCal-PROPFIND.result index b57617b0..646a4d9e 100644 --- a/testing/tests/regression-suite/0522-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0522-iCal-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "b11fc11a4033759ef4a7694f058b95cc" -Content-Length: 3932 +ETag: "8ae10873cb1929fd0e66571128cf01ea" +Content-Length: 4594 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user2/ @@ -58,6 +58,31 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user2/addresses/ + + + "7e58d63b60197ceb55a1c487989a3720" + user2 addresses + + + + + + /caldav.php/user2/home/ + + + HTTP/1.1 200 OK + + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user2/.in/ diff --git a/testing/tests/regression-suite/0524-iCal-PROPFIND.result b/testing/tests/regression-suite/0524-iCal-PROPFIND.result index 8f237faa..c7c80c5b 100644 --- a/testing/tests/regression-suite/0524-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0524-iCal-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "3ff13339128a73ed5d25308b678c3bc5" -Content-Length: 4847 +ETag: "45a0a8b922545d0793e9b0b9d10726fe" +Content-Length: 6054 Content-Type: text/xml; charset="utf-8" - + /caldav.php/manager1/ @@ -82,6 +82,43 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/manager1/addresses/ + + + "c240642ddef994358c96da82c0361a58" + manager1 addresses + + + + + + /caldav.php/assistant1/ + /caldav.php/teamclient1/ + /caldav.php/user1/ + /caldav.php/user1/calendar-proxy-read/ + /caldav.php/assistant1/calendar-proxy-read/ + /caldav.php/resource1/calendar-proxy-read/ + /caldav.php/resource2/calendar-proxy-read/ + + + /caldav.php/user1/ + /caldav.php/assistant1/ + /caldav.php/resource1/ + /caldav.php/resource2/ + + + + HTTP/1.1 200 OK + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/manager1/calendar-proxy-read/ diff --git a/testing/tests/regression-suite/0532-iCal4-PROPFIND.result b/testing/tests/regression-suite/0532-iCal4-PROPFIND.result index a49014fe..1135ec42 100644 --- a/testing/tests/regression-suite/0532-iCal4-PROPFIND.result +++ b/testing/tests/regression-suite/0532-iCal4-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "e7cd1ee6cd4eb1e0e2aaa1d2b5a0bfb1" -Content-Length: 15648 +ETag: "9e402a9adb641a6ce4891a105f7963bd" +Content-Length: 17404 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ @@ -161,6 +161,78 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ + + + "24c9e15e52afc47c225b757e7bee1f9d" + user1 addresses + + + + + + /caldav.php/user1/home/ + /caldav.php/user1/created/ + /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ + + + /user1/home/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTTP/1.1 200 OK + + + + + + + + + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ diff --git a/testing/tests/regression-suite/0536-iCal4-PROPFIND.result b/testing/tests/regression-suite/0536-iCal4-PROPFIND.result index 5d8d0784..106d36aa 100644 --- a/testing/tests/regression-suite/0536-iCal4-PROPFIND.result +++ b/testing/tests/regression-suite/0536-iCal4-PROPFIND.result @@ -2,7 +2,7 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "6466df744e5f263784fd0e85915683b6" +ETag: "c932a7b77636c45a6395fb906c9ff80c" Content-Length: 4421 Content-Type: text/xml; charset="utf-8" @@ -40,7 +40,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/20061101T073004Z.ics - "c3658901fd4689d4a1e1d6f08601ef4f" + "bcc402382688cb3e8e57379c757dbcb0" HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0544-gzip-PUT.data b/testing/tests/regression-suite/0544-gzip-PUT.data new file mode 100644 index 0000000000000000000000000000000000000000..bd147ff683f6b921e3579fbc83d013709ab23ad8 GIT binary patch literal 429 zcmV;e0aE@SiwFQY42wb+A71jtPSP+I){n%i; zeQpj|?KYz@6m8pVH^1sXI3AHOlp2A9JG!vBm2+bi*J##zdzH(T(GvL;xViSFerxKk zUT=5nwB8-M$KPxD+O_){Jp{Q*t#KyvK`Kme62ya#;MGFS?>yL;EOXLl*5vGhP(qNk zB}~q&yq{K*+eLLdt8%0L-E<5mP)-BtN+i7V+16Iez#CM+PM;=Q44K%r;B)axwdNxPRR8Nl~657;y8HzyWIyx3B6jbUBOJj?@NhXndjVAOzrTnCERc6 z5=Z-&OKdg=oE#eb)OMKSrhV-`(%c@`HvM7GA25lh@hPtGkl=r0$smJyd2yc2Nl2hm X$!K3qU&ZP8`J=xBbZ|s)`2qj{@AuI< literal 0 HcmV?d00001 diff --git a/testing/tests/regression-suite/0544-iCLoud-PUT-encoded.result b/testing/tests/regression-suite/0544-iCLoud-PUT-encoded.result new file mode 100644 index 00000000..c9319fdb --- /dev/null +++ b/testing/tests/regression-suite/0544-iCLoud-PUT-encoded.result @@ -0,0 +1,8 @@ +HTTP/1.1 201 Created +Date: Dow, 01 Jan 2000 00:00:00 GMT +DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule +DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule +ETag: "6ddd18264a9d40c1c9d37a005eeb7e4f" +Content-Length: 0 +Content-Type: text/plain; charset="utf-8" + diff --git a/testing/tests/regression-suite/0544-iCLoud-PUT-encoded.test b/testing/tests/regression-suite/0544-iCLoud-PUT-encoded.test new file mode 100644 index 00000000..aed587c6 --- /dev/null +++ b/testing/tests/regression-suite/0544-iCLoud-PUT-encoded.test @@ -0,0 +1,14 @@ +# +# Testing with a process similar to iCal4 +# +TYPE=PUT +URL=http://regression.host/caldav.php/user1/home/0544-gzip-PUT.ics +HEAD + +HEADER=DAVKit/4.0 (729); CalendarStore/4.0 (965); iCal/4.0 (1362); Mac OS X/10.6.1 (10B504) +HEADER=Content-Type: text/calendar +HEADER=Content-Encoding: gzip + +# +# +DATA=0544-gzip-PUT diff --git a/testing/tests/regression-suite/0553-iPhone-PROPFIND.result b/testing/tests/regression-suite/0553-iPhone-PROPFIND.result index d44d90c6..bab42055 100644 --- a/testing/tests/regression-suite/0553-iPhone-PROPFIND.result +++ b/testing/tests/regression-suite/0553-iPhone-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "ffa85945cfea407705b4af67ba7f4259" -Content-Length: 11513 +ETag: "2bac61d8cc65cae86757a7dd00eef4e2" +Content-Length: 12754 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ @@ -70,7 +70,7 @@ Content-Type: text/xml; charset="utf-8" user1 home - "86a1e7300c8b748329ad3617974ad08a" + "a707eb83606863b8f1f30274b6b1a5b8" #0252D4FF @@ -131,6 +131,63 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ + + + user1 addresses + "24c9e15e52afc47c225b757e7bee1f9d" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTTP/1.1 200 OK + + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ diff --git a/testing/tests/regression-suite/0554-iPhone-PROPFIND.result b/testing/tests/regression-suite/0554-iPhone-PROPFIND.result index d44d90c6..bab42055 100644 --- a/testing/tests/regression-suite/0554-iPhone-PROPFIND.result +++ b/testing/tests/regression-suite/0554-iPhone-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "ffa85945cfea407705b4af67ba7f4259" -Content-Length: 11513 +ETag: "2bac61d8cc65cae86757a7dd00eef4e2" +Content-Length: 12754 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ @@ -70,7 +70,7 @@ Content-Type: text/xml; charset="utf-8" user1 home - "86a1e7300c8b748329ad3617974ad08a" + "a707eb83606863b8f1f30274b6b1a5b8" #0252D4FF @@ -131,6 +131,63 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ + + + user1 addresses + "24c9e15e52afc47c225b757e7bee1f9d" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HTTP/1.1 200 OK + + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ diff --git a/testing/tests/regression-suite/0555-iPhone-REPORT.result b/testing/tests/regression-suite/0555-iPhone-REPORT.result index 920d3dd4..4719202e 100644 --- a/testing/tests/regression-suite/0555-iPhone-REPORT.result +++ b/testing/tests/regression-suite/0555-iPhone-REPORT.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "571aa22469ee7442c32ba35664da10de" -Content-Length: 880 +ETag: "9c90079c6ad9a199bbf4a3b36eb92246" +Content-Length: 1123 Content-Type: text/xml; charset="utf-8" @@ -38,4 +38,14 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 200 OK + + /caldav.php/user1/home/0544-gzip-PUT.ics + + + "6ddd18264a9d40c1c9d37a005eeb7e4f" + + + HTTP/1.1 200 OK + + diff --git a/testing/tests/regression-suite/0558-iPhone-PROPFIND.result b/testing/tests/regression-suite/0558-iPhone-PROPFIND.result index bd292414..cd0d2ddb 100644 --- a/testing/tests/regression-suite/0558-iPhone-PROPFIND.result +++ b/testing/tests/regression-suite/0558-iPhone-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "d98f282a5121894cde0b43b6ecf143df" -Content-Length: 4285 +ETag: "4b62114cda76b7d0b7e18ee55488af71" +Content-Length: 4741 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ @@ -47,6 +47,25 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 200 OK + + /caldav.php/user1/addresses/ + + + user1 addresses + + + + + + HTTP/1.1 200 OK + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ @@ -146,7 +165,7 @@ Content-Type: text/xml; charset="utf-8" /user1/calendar-proxy-read/ - + HTTP/1.1 200 OK @@ -165,7 +184,7 @@ Content-Type: text/xml; charset="utf-8" /user1/calendar-proxy-write/ - + HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0598-REPORT-sync-initial.result b/testing/tests/regression-suite/0598-REPORT-sync-initial.result index 4da26c6d..97c429a0 100644 --- a/testing/tests/regression-suite/0598-REPORT-sync-initial.result +++ b/testing/tests/regression-suite/0598-REPORT-sync-initial.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "4455c8df8e5a0572ba52dccb00843cfe" -Content-Length: 4030 +ETag: "f3c2aff3ffaca5f51dea5f2aa5eb194a" +Content-Length: 4253 Content-Type: text/xml; charset="utf-8" @@ -21,7 +21,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/20061101T073004Z.ics - "c3658901fd4689d4a1e1d6f08601ef4f" + "bcc402382688cb3e8e57379c757dbcb0" HTTP/1.1 200 OK @@ -152,5 +152,14 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 200 OK + + /caldav.php/user1/home/0544-gzip-PUT.ics + + + "6ddd18264a9d40c1c9d37a005eeb7e4f" + + HTTP/1.1 200 OK + + data:,2 diff --git a/testing/tests/regression-suite/0599-REPORT-sync-changed.result b/testing/tests/regression-suite/0599-REPORT-sync-changed.result index 874767f9..e2f739cf 100644 --- a/testing/tests/regression-suite/0599-REPORT-sync-changed.result +++ b/testing/tests/regression-suite/0599-REPORT-sync-changed.result @@ -2,12 +2,21 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "a4ec15e128c8e06e81c57af754448f81" -Content-Length: 3786 +ETag: "5b017196880ac06e0b2b5579ba6e5153" +Content-Length: 4009 Content-Type: text/xml; charset="utf-8" + + /caldav.php/user1/home/0544-gzip-PUT.ics + + + "6ddd18264a9d40c1c9d37a005eeb7e4f" + + HTTP/1.1 200 OK + + /caldav.php/user1/home/0575d895-a006-4ed8-9be6-0d1b6b6b1f96.ics @@ -30,7 +39,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/20061101T073004Z.ics - "c3658901fd4689d4a1e1d6f08601ef4f" + "bcc402382688cb3e8e57379c757dbcb0" HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0602-Soho-PROPFIND.result b/testing/tests/regression-suite/0602-Soho-PROPFIND.result index 0af03256..08e51f1f 100644 --- a/testing/tests/regression-suite/0602-Soho-PROPFIND.result +++ b/testing/tests/regression-suite/0602-Soho-PROPFIND.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "12c556718c27de34471b0b9f333610fc" -Content-Length: 15922 +ETag: "98b7c2157174c7fe61cb19bd4807456c" +Content-Length: 17006 Content-Type: text/xml; charset="utf-8" @@ -404,6 +404,50 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/home/0544-gzip-PUT.ics + + + + /caldav.php/user1/ + + + mailto:user1@example.net + /caldav.php/user1/ + + + HTTP/1.1 200 OK + + + + + + + HTTP/1.1 404 Not Found + + + + /caldav.php/user1/addresses/ + + + + /caldav.php/user1/ + + + mailto:user1@example.net + /caldav.php/user1/ + + + HTTP/1.1 200 OK + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ diff --git a/testing/tests/regression-suite/0603-Soho-PROPFIND.result b/testing/tests/regression-suite/0603-Soho-PROPFIND.result index 99d79f02..c71f1dda 100644 --- a/testing/tests/regression-suite/0603-Soho-PROPFIND.result +++ b/testing/tests/regression-suite/0603-Soho-PROPFIND.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "2c82262a1c8f2caf0dccf46188970a65" -Content-Length: 5036 +ETag: "cb882ded16756e36bbd614591982f2e7" +Content-Length: 5572 Content-Type: text/xml; charset="utf-8" @@ -52,6 +52,28 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ + + + + /caldav.php/user1/ + + + mailto:user1@example.net + /caldav.php/user1/ + + + HTTP/1.1 200 OK + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/created/ diff --git a/testing/tests/regression-suite/0800-Spec-LOCK-1.result b/testing/tests/regression-suite/0800-Spec-LOCK-1.result index f199e12e..7e502274 100644 --- a/testing/tests/regression-suite/0800-Spec-LOCK-1.result +++ b/testing/tests/regression-suite/0800-Spec-LOCK-1.result @@ -3,7 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule Lock-Token: -Content-Length: 460 +Content-Length: 456 Content-Type: text/xml; charset="utf-8" @@ -20,7 +20,7 @@ Content-Type: text/xml; charset="utf-8" http://andrew.mcmillan.net.nz/node/5/ - Second-8640000 + Second-300 opaquelocktoken:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/testing/tests/regression-suite/0801-Spec-LOCK-1.result b/testing/tests/regression-suite/0801-Spec-LOCK-1.result index 14e5c67f..bb88962d 100644 --- a/testing/tests/regression-suite/0801-Spec-LOCK-1.result +++ b/testing/tests/regression-suite/0801-Spec-LOCK-1.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -Content-Length: 460 +Content-Length: 456 Content-Type: text/xml; charset="utf-8" @@ -19,7 +19,7 @@ Content-Type: text/xml; charset="utf-8" http://andrew.mcmillan.net.nz/node/5/ - Second-8640000 + Second-300 opaquelocktoken:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/testing/tests/regression-suite/0810-Spec-LOCK-1.result b/testing/tests/regression-suite/0810-Spec-LOCK-1.result index f199e12e..7e502274 100644 --- a/testing/tests/regression-suite/0810-Spec-LOCK-1.result +++ b/testing/tests/regression-suite/0810-Spec-LOCK-1.result @@ -3,7 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule Lock-Token: -Content-Length: 460 +Content-Length: 456 Content-Type: text/xml; charset="utf-8" @@ -20,7 +20,7 @@ Content-Type: text/xml; charset="utf-8" http://andrew.mcmillan.net.nz/node/5/ - Second-8640000 + Second-300 opaquelocktoken:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/testing/tests/regression-suite/0811-Spec-LOCK-1.result b/testing/tests/regression-suite/0811-Spec-LOCK-1.result index 14e5c67f..bb88962d 100644 --- a/testing/tests/regression-suite/0811-Spec-LOCK-1.result +++ b/testing/tests/regression-suite/0811-Spec-LOCK-1.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -Content-Length: 460 +Content-Length: 456 Content-Type: text/xml; charset="utf-8" @@ -19,7 +19,7 @@ Content-Type: text/xml; charset="utf-8" http://andrew.mcmillan.net.nz/node/5/ - Second-8640000 + Second-300 opaquelocktoken:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result b/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result index 17f6a36d..2e450940 100644 --- a/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result +++ b/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result @@ -78,11 +78,11 @@ 20061031T183000Z - A Meeting + A Changed Meeting - 1059 + 829 text/calendar - "c3658901fd4689d4a1e1d6f08601ef4f" + "bcc402382688cb3e8e57379c757dbcb0" Dow, 01 Jan 2000 00:00:00 GMT @@ -598,6 +598,41 @@ HTTP/1.1 404 Not Found + + /caldav.php/user1/home/0544-gzip-PUT.ics + + + 20111004T023507Z + In Central Europe, 2pm, Oct 5th for 1 hour + + 761 + text/calendar + "6ddd18264a9d40c1c9d37a005eeb7e4f" + Dow, 01 Jan 2000 00:00:00 GMT + + + + + + + + + + + + + HTTP/1.1 200 OK + + + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/home/DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics diff --git a/testing/tests/regression-suite/0838-Spec-LOCK.result b/testing/tests/regression-suite/0838-Spec-LOCK.result index f199e12e..7e502274 100644 --- a/testing/tests/regression-suite/0838-Spec-LOCK.result +++ b/testing/tests/regression-suite/0838-Spec-LOCK.result @@ -3,7 +3,7 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule Lock-Token: -Content-Length: 460 +Content-Length: 456 Content-Type: text/xml; charset="utf-8" @@ -20,7 +20,7 @@ Content-Type: text/xml; charset="utf-8" http://andrew.mcmillan.net.nz/node/5/ - Second-8640000 + Second-300 opaquelocktoken:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx diff --git a/testing/tests/regression-suite/0840-Spec-PROPPATCH-1.result b/testing/tests/regression-suite/0840-Spec-PROPPATCH-1.result index f1e0fff2..56cd9a6a 100644 --- a/testing/tests/regression-suite/0840-Spec-PROPPATCH-1.result +++ b/testing/tests/regression-suite/0840-Spec-PROPPATCH-1.result @@ -36,19 +36,19 @@ Content-Type: text/xml; charset="utf-8" -changed_last_60se: >1< + changed_recently: >1< dav_displayname: >user1 home< is_calendar: >1< resourcetypes: >< changed_by: >10< -changed_last_30se: >1< + changed_recently: >1< dav_name: >/user1/home/< property_name: >http://apple.com/ns/ical/:calendar-color< property_value: >#0252D4FF< changed_by: >10< -changed_last_30se: >1< + changed_recently: >1< dav_name: >/user1/home/< property_name: >http://apple.com/ns/ical/:calendar-order< property_value: >1< diff --git a/testing/tests/regression-suite/0840-Spec-PROPPATCH-1.test b/testing/tests/regression-suite/0840-Spec-PROPPATCH-1.test index b0773e9f..2f9a1b61 100644 --- a/testing/tests/regression-suite/0840-Spec-PROPPATCH-1.test +++ b/testing/tests/regression-suite/0840-Spec-PROPPATCH-1.test @@ -30,13 +30,13 @@ ENDDATA QUERY SELECT dav_displayname, is_calendar, resourcetypes, - modified > (current_timestamp - '60 seconds'::interval) AS changed_last_60secs + modified > (current_timestamp - '120 seconds'::interval) AS changed_recently FROM collection WHERE dav_name = '/user1/home/' ORDER BY collection_id ENDQUERY QUERY SELECT dav_name, property_name, property_value, changed_by, - changed_on > (current_timestamp - '60 seconds'::interval) AS changed_last_30secs + changed_on > (current_timestamp - '120 seconds'::interval) AS changed_recently FROM property WHERE dav_name = '/user1/home/' ORDER BY dav_name, property_name diff --git a/testing/tests/regression-suite/0850-Spec-REPORT-1.result b/testing/tests/regression-suite/0850-Spec-REPORT-1.result index b07df404..c8e88b6a 100644 --- a/testing/tests/regression-suite/0850-Spec-REPORT-1.result +++ b/testing/tests/regression-suite/0850-Spec-REPORT-1.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "26a689e219dfe12c47d9bdf005cee099" -Content-Length: 1447 +ETag: "680074e03fc52481b3dfabaa48d555a7" +Content-Length: 1217 Content-Type: text/xml; charset="utf-8" @@ -12,7 +12,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/20061101T073004Z.ics - "c3658901fd4689d4a1e1d6f08601ef4f" + "bcc402382688cb3e8e57379c757dbcb0" BEGIN:VCALENDAR CALSCALE:GREGORIAN PRODID:-//Ximian//NONSGML Evolution Calendar//EN @@ -20,13 +20,9 @@ VERSION:2.0 BEGIN:VEVENT UID:20061101T073000Z-10468-1000-1-7@ubu DTSTAMP:20061101T073000Z -DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: - 20061101T100000 -DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: - 20061101T110000 -SUMMARY:A Meeting -X-EVOLUTION-CALDAV-HREF:http: - //user1@mycaldav/caldav.php/user1/home/20061101T073004Z.ics +DTSTART;TZID=Pacific/Auckland:20061101T100000 +DTEND;TZID=Pacific/Auckland:20061101T110000 +SUMMARY:A Changed Meeting BEGIN:VALARM X-EVOLUTION-ALARM-UID:20061101T073000Z-10480-1000-1-5@ubu ACTION:DISPLAY @@ -35,8 +31,7 @@ DESCRIPTION:A Meeting END:VALARM END:VEVENT BEGIN:VTIMEZONE -TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland -X-LIC-LOCATION:Pacific/Auckland +TZID:Pacific/Auckland BEGIN:STANDARD TZOFFSETFROM:+1300 TZOFFSETTO:+1200 diff --git a/testing/tests/regression-suite/0851-Spec-REPORT-1.result b/testing/tests/regression-suite/0851-Spec-REPORT-1.result index fafa9bf8..a195cdff 100644 --- a/testing/tests/regression-suite/0851-Spec-REPORT-1.result +++ b/testing/tests/regression-suite/0851-Spec-REPORT-1.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "8a4795998583adf6b23d24f4a9e73448" -Content-Length: 5019 +ETag: "474324273ec7b8c0d7e8b090e7ddcb42" +Content-Length: 4789 Content-Type: text/xml; charset="utf-8" @@ -55,7 +55,7 @@ END:VCALENDAR /caldav.php/user1/home/20061101T073004Z.ics - "c3658901fd4689d4a1e1d6f08601ef4f" + "bcc402382688cb3e8e57379c757dbcb0" BEGIN:VCALENDAR CALSCALE:GREGORIAN PRODID:-//Ximian//NONSGML Evolution Calendar//EN @@ -63,13 +63,9 @@ VERSION:2.0 BEGIN:VEVENT UID:20061101T073000Z-10468-1000-1-7@ubu DTSTAMP:20061101T073000Z -DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: - 20061101T100000 -DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: - 20061101T110000 -SUMMARY:A Meeting -X-EVOLUTION-CALDAV-HREF:http: - //user1@mycaldav/caldav.php/user1/home/20061101T073004Z.ics +DTSTART;TZID=Pacific/Auckland:20061101T100000 +DTEND;TZID=Pacific/Auckland:20061101T110000 +SUMMARY:A Changed Meeting BEGIN:VALARM X-EVOLUTION-ALARM-UID:20061101T073000Z-10480-1000-1-5@ubu ACTION:DISPLAY @@ -78,8 +74,7 @@ DESCRIPTION:A Meeting END:VALARM END:VEVENT BEGIN:VTIMEZONE -TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland -X-LIC-LOCATION:Pacific/Auckland +TZID:Pacific/Auckland BEGIN:STANDARD TZOFFSETFROM:+1300 TZOFFSETTO:+1200 diff --git a/testing/tests/regression-suite/0901-GET-Collection.result b/testing/tests/regression-suite/0901-GET-Collection.result index fb9fbadc..24ce380b 100644 --- a/testing/tests/regression-suite/0901-GET-Collection.result +++ b/testing/tests/regression-suite/0901-GET-Collection.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -Content-Length: 10383 +Content-Length: 10461 Etag: "855cbfab1940e342d7986c207bf3f973" Content-Type: text/calendar; charset="utf-8" @@ -23,13 +23,9 @@ END:VEVENT BEGIN:VEVENT UID:20061101T073000Z-10468-1000-1-7@ubu DTSTAMP:20061101T073000Z -DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland:20061 - 101T100000 -DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland:2006110 - 1T110000 -SUMMARY:A Meeting -X-EVOLUTION-CALDAV-HREF:http://user1@mycaldav/caldav.php/user1/home/2006 - 1101T073004Z.ics +DTSTART;TZID=Pacific/Auckland:20061101T100000 +DTEND;TZID=Pacific/Auckland:20061101T110000 +SUMMARY:A Changed Meeting BEGIN:VALARM X-EVOLUTION-ALARM-UID:20061101T073000Z-10480-1000-1-5@ubu ACTION:DISPLAY @@ -228,6 +224,16 @@ DTSTAMP:20091006T225808Z SEQUENCE:1 END:VEVENT BEGIN:VEVENT +CREATED:20111004T153507Z +UID:0544-gzip-PUT +TRANSP:OPAQUE +SUMMARY:In Central Europe, 2pm, Oct 5th for 1 hour +DTSTART;TZID=Somewhere_in_Central_Europe:20111005T140000 +DTEND;TZID=Somewhere_in_Central_Europe:20111005T150000 +DTSTAMP:20111004T153507Z +SEQUENCE:1 +END:VEVENT +BEGIN:VEVENT DESCRIPTION:Have a party. All the best parties are monthly! UID:DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74 DTSTAMP:20081024T220925Z @@ -266,8 +272,7 @@ TZOFFSETTO:+1200 END:STANDARD END:VTIMEZONE BEGIN:VTIMEZONE -TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland -X-LIC-LOCATION:Pacific/Auckland +TZID:Pacific/Auckland BEGIN:STANDARD TZOFFSETFROM:+1300 TZOFFSETTO:+1200 @@ -338,23 +343,6 @@ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10 END:DAYLIGHT END:VTIMEZONE BEGIN:VTIMEZONE -TZID:Pacific/Auckland -BEGIN:STANDARD -DTSTART:20000319T030000 -RRULE:FREQ=YEARLY;BYDAY=3SU;BYMONTH=3 -TZNAME:Pacific/Auckland -TZOFFSETFROM:+1300 -TZOFFSETTO:+1200 -END:STANDARD -BEGIN:DAYLIGHT -DTSTART:20001001T020000 -RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=10 -TZNAME:Pacific/Auckland -TZOFFSETFROM:+1200 -TZOFFSETTO:+1300 -END:DAYLIGHT -END:VTIMEZONE -BEGIN:VTIMEZONE TZID:Europe/Prague BEGIN:DAYLIGHT TZOFFSETFROM:+0100 @@ -371,4 +359,22 @@ TZNAME:GMT+01:00 TZOFFSETTO:+0100 END:STANDARD END:VTIMEZONE +BEGIN:VTIMEZONE +TZID:Somewhere_in_Central_Europe +X-MICROSOFT-CDO-TZID:4 +BEGIN:DAYLIGHT +TZOFFSETFROM:+0100 +RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU +DTSTART:19810329T020000 +TZNAME:GMT+02:00 +TZOFFSETTO:+0200 +END:DAYLIGHT +BEGIN:STANDARD +TZOFFSETFROM:+0200 +RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU +DTSTART:19961027T030000 +TZNAME:GMT+01:00 +TZOFFSETTO:+0100 +END:STANDARD +END:VTIMEZONE END:VCALENDAR diff --git a/testing/tests/regression-suite/0902-PUT-collection.result b/testing/tests/regression-suite/0902-PUT-collection.result index 2518ea37..bed510bd 100644 --- a/testing/tests/regression-suite/0902-PUT-collection.result +++ b/testing/tests/regression-suite/0902-PUT-collection.result @@ -16,7 +16,7 @@ Content-Type: text/plain; charset="utf-8" attendees: >40< - collection_id: >1564< + collection_id: >1565< dav_displayname: >anotherone< dav_etag: >f9a8ee6b41d9b02aa5176e6da349121a< dav_name: >/user1/anotherone/< diff --git a/testing/tests/regression-suite/0912-Space-PROPFIND.result b/testing/tests/regression-suite/0912-Space-PROPFIND.result index 0581eea3..dae493bc 100644 --- a/testing/tests/regression-suite/0912-Space-PROPFIND.result +++ b/testing/tests/regression-suite/0912-Space-PROPFIND.result @@ -2,12 +2,12 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "dc48f1e4638af53b05dd0f29f1906989" -Content-Length: 3827 +ETag: "f640afc35eb1b3892d84512c69748944" +Content-Length: 4581 Content-Type: text/xml; charset="utf-8" - + /caldav.php/User%20Six/ @@ -60,6 +60,32 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/User%20Six/addresses/ + + + "28e06afe6d538a7e84518750357ef98d" + User Six addresses + + + + + + /caldav.php/User%20Six/home/ + /caldav.php/User%20Six/DEADBEEF-EFD9-4F0F-9BDC-5335E04D47E0/ + + + HTTP/1.1 200 OK + + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/User%20Six/DEADBEEF-EFD9-4F0F-9BDC-5335E04D47E0/ diff --git a/testing/tests/regression-suite/0924-MOVE.result b/testing/tests/regression-suite/0924-MOVE.result index d95425a3..1cc2302d 100644 --- a/testing/tests/regression-suite/0924-MOVE.result +++ b/testing/tests/regression-suite/0924-MOVE.result @@ -6,9 +6,9 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - cd_collection: >1564< + cd_collection: >1565< cd_user_no: >10< - ci_collection: >1564< + ci_collection: >1565< ci_user_no: >10< data_name: >/user1/anotherone/DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics< item_name: >/user1/anotherone/DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics< diff --git a/testing/tests/regression-suite/0941-GET-resource-denied.result b/testing/tests/regression-suite/0941-GET-resource-denied.result index d172a3e1..ea5e4f1b 100644 --- a/testing/tests/regression-suite/0941-GET-resource-denied.result +++ b/testing/tests/regression-suite/0941-GET-resource-denied.result @@ -2,8 +2,8 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -Etag: "c3658901fd4689d4a1e1d6f08601ef4f" -Content-Length: 826 +Etag: "bcc402382688cb3e8e57379c757dbcb0" +Content-Length: 676 Content-Type: text/calendar; charset="utf-8" BEGIN:VCALENDAR @@ -11,8 +11,7 @@ CALSCALE:GREGORIAN PRODID:-//Ximian//NONSGML Evolution Calendar//EN VERSION:2.0 BEGIN:VTIMEZONE -TZID:/softwarestudio.org/Olson_20011030_5/Pacific/Auckland -X-LIC-LOCATION:Pacific/Auckland +TZID:Pacific/Auckland BEGIN:STANDARD TZOFFSETFROM:+1300 TZOFFSETTO:+1200 @@ -31,10 +30,8 @@ END:VTIMEZONE BEGIN:VEVENT SUMMARY:Busy CLASS:CONFIDENTIAL -DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: - 20061101T100000 -DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Pacific/Auckland: - 20061101T110000 +DTSTART;TZID=Pacific/Auckland:20061101T100000 +DTEND;TZID=Pacific/Auckland:20061101T110000 UID:20061101T073000Z-10468-1000-1-7@ubu END:VEVENT END:VCALENDAR diff --git a/testing/tests/regression-suite/0965-GET.result b/testing/tests/regression-suite/0965-GET.result new file mode 100644 index 00000000..5716c2a8 --- /dev/null +++ b/testing/tests/regression-suite/0965-GET.result @@ -0,0 +1,41 @@ +HTTP/1.1 200 OK +Date: Dow, 01 Jan 2000 00:00:00 GMT +DAV: 1, 2, calendar-access +Etag: "13249ced6c7527191a003f54f7e3cd25" +Content-Length: 834 +Content-Type: text/calendar; charset="utf-8" + +BEGIN:VCALENDAR +PRODID:-//davical.org//NONSGML AWL Calendar//EN +VERSION:2.0 +CALSCALE:GREGORIAN +BEGIN:VEVENT +CREATED:20081023T055115Z +LAST-MODIFIED:20081023T055139Z +DTSTAMP:20081023T055115Z +UID:9429a973-2b13-4b1a-be09-948d75425c45 +SUMMARY:Weekly catch-up +RRULE:FREQ=WEEKLY;INTERVAL=1 +DTSTART;TZID=Pacific/Auckland:20081024T140000 +DTEND;TZID=Pacific/Auckland:20081024T150000 +X-MOZ-GENERATION:2 +END:VEVENT +BEGIN:VTIMEZONE +TZID:Pacific/Auckland +X-LIC-LOCATION:Pacific/Auckland +BEGIN:DAYLIGHT +TZOFFSETFROM:+1200 +TZOFFSETTO:+1300 +TZNAME:NZDT +DTSTART:19700927T020000 +RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=9 +END:DAYLIGHT +BEGIN:STANDARD +TZOFFSETFROM:+1300 +TZOFFSETTO:+1200 +TZNAME:NZST +DTSTART:19700405T030000 +RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=4 +END:STANDARD +END:VTIMEZONE +END:VCALENDAR diff --git a/testing/tests/regression-suite/0965-GET.test b/testing/tests/regression-suite/0965-GET.test new file mode 100644 index 00000000..20f297eb --- /dev/null +++ b/testing/tests/regression-suite/0965-GET.test @@ -0,0 +1,20 @@ +# +# Test GET access to a non-public calendar using a ticket. +# +TYPE=GET +URL=http://regression.host/public.php/user2/home/9429a973-2b13-4b1a-be09-948d75425c45.ics +NOAUTH + +# Get the ticket we created earlier in 948... +GETSQL=ticket +SELECT ticket_id FROM access_ticket + WHERE target_collection_id = 11 AND target_resource_id is null; +ENDSQL + +HEADER=User-Agent: DAViCalTester/public +HEADER=Ticket: ##ticket## +HEAD + +BEGINDATA +ENDDATA + diff --git a/testing/tests/regression-suite/1100-REPORT-sync-changed.result b/testing/tests/regression-suite/1100-REPORT-sync-changed.result index ff223a4c..5cadb34e 100644 --- a/testing/tests/regression-suite/1100-REPORT-sync-changed.result +++ b/testing/tests/regression-suite/1100-REPORT-sync-changed.result @@ -2,12 +2,22 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "40e69ecd1e31ae458e1fa4505c1ee585" -Content-Length: 5879 +ETag: "9e36538f6420769c24958617f475b7a8" +Content-Length: 6171 Content-Type: text/xml; charset="utf-8" + + /caldav.php/user1/home/0544-gzip-PUT.ics + + + "6ddd18264a9d40c1c9d37a005eeb7e4f" + Dow, 01 Jan 2000 00:00:00 GMT + + HTTP/1.1 200 OK + + /caldav.php/user1/home/0575d895-a006-4ed8-9be6-0d1b6b6b1f96.ics @@ -32,7 +42,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/20061101T073004Z.ics - "c3658901fd4689d4a1e1d6f08601ef4f" + "bcc402382688cb3e8e57379c757dbcb0" Dow, 01 Jan 2000 00:00:00 GMT HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/sample-data.sql b/testing/tests/regression-suite/sample-data.sql index e7310ce7..6ea4c463 100644 --- a/testing/tests/regression-suite/sample-data.sql +++ b/testing/tests/regression-suite/sample-data.sql @@ -54,6 +54,15 @@ INSERT INTO collection (user_no, parent_container, dav_name, dav_etag, FALSE, FALSE, user_no, '' FROM usr; +INSERT INTO collection (user_no, parent_container, dav_name, dav_etag, + dav_displayname, is_calendar, is_addressbook, created, modified, + public_events_only, publicly_readable, collection_id, resourcetypes ) + SELECT user_no, '/' || username || '/', '/' || username || '/addresses/', md5(username), + username || ' addresses', FALSE, TRUE, '1957-07-26', '1998-03-16', + FALSE, FALSE, user_no + 50, '' + FROM usr; + + INSERT INTO principal (type_id, user_no, displayname, default_privileges) SELECT 1, user_no, fullname, privilege_to_bits(ARRAY['read-free-busy','schedule-send','schedule-deliver']) FROM usr WHERE NOT EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Group' AND role_member.user_no = usr.user_no) diff --git a/testing/tests/scheduling/Restore-Database.result b/testing/tests/scheduling/Restore-Database.result index cb4fb022..f64f5bae 100644 --- a/testing/tests/scheduling/Restore-Database.result +++ b/testing/tests/scheduling/Restore-Database.result @@ -1,6 +1,6 @@ setval -------- - 1639 + 1641 (1 row) setval @@ -30,7 +30,7 @@ setval -------- - 11 + 12 (1 row) setval diff --git a/testing/tests/timezone/5010-list.result b/testing/tests/timezone/5010-list.result index a68904dc..c05b53ba 100644 --- a/testing/tests/timezone/5010-list.result +++ b/testing/tests/timezone/5010-list.result @@ -1,6 +1,6 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT -Content-Length: 2644 +Content-Length: 2857 Content-Type: application/xml; charset="utf-8" @@ -71,6 +71,13 @@ Content-Type: application/xml; charset="utf-8" Pacific/Auckland /softwarestudio.org/Olson_20011030_5/Pacific/Auckland + + Somewhere_in_Central_Europe + all good + + + Somewhere_in_Central_Europe + (UTC-05:00) Eastern Time (US & Canada) all good diff --git a/testing/tests/timezone/5021-list.result b/testing/tests/timezone/5021-list.result index e81aed44..ef662218 100644 --- a/testing/tests/timezone/5021-list.result +++ b/testing/tests/timezone/5021-list.result @@ -8,1836 +8,1836 @@ Content-Type: application/xml; charset="utf-8" Africa/Abidjan all good - Africa/Abidjan + Africa/Abidjan Africa/Accra all good - Africa/Accra + Africa/Accra Africa/Addis_Ababa all good - Africa/Addis_Ababa + Africa/Addis_Ababa Africa/Algiers all good - Africa/Algiers + Africa/Algiers Africa/Asmara all good - Africa/Asmara + Africa/Asmara Africa/Bamako all good - Africa/Bamako + Africa/Bamako Africa/Bangui all good - Africa/Bangui + Africa/Bangui Africa/Banjul all good - Africa/Banjul + Africa/Banjul Africa/Bissau all good - Africa/Bissau + Africa/Bissau Africa/Blantyre all good - Africa/Blantyre + Africa/Blantyre Africa/Brazzaville all good - Africa/Brazzaville + Africa/Brazzaville Africa/Bujumbura all good - Africa/Bujumbura + Africa/Bujumbura Africa/Cairo all good - Africa/Cairo + Africa/Cairo Africa/Casablanca all good - Africa/Casablanca + Africa/Casablanca Africa/Ceuta all good - Africa/Ceuta + Africa/Ceuta Africa/Conakry all good - Africa/Conakry + Africa/Conakry Africa/Dakar all good - Africa/Dakar + Africa/Dakar Africa/Dar_es_Salaam all good - Africa/Dar_es_Salaam + Africa/Dar_es_Salaam Africa/Djibouti all good - Africa/Djibouti + Africa/Djibouti Africa/Douala all good - Africa/Douala + Africa/Douala Africa/El_Aaiun all good - Africa/El_Aaiun + Africa/El_Aaiun Africa/Freetown all good - Africa/Freetown + Africa/Freetown Africa/Gaborone all good - Africa/Gaborone + Africa/Gaborone Africa/Harare all good - Africa/Harare + Africa/Harare Africa/Johannesburg all good - Africa/Johannesburg + Africa/Johannesburg Africa/Juba all good - Africa/Juba + Africa/Juba Africa/Kampala all good - Africa/Kampala + Africa/Kampala Africa/Khartoum all good - Africa/Khartoum + Africa/Khartoum Africa/Kigali all good - Africa/Kigali + Africa/Kigali Africa/Kinshasa all good - Africa/Kinshasa + Africa/Kinshasa Africa/Lagos all good - Africa/Lagos + Africa/Lagos Africa/Libreville all good - Africa/Libreville + Africa/Libreville Africa/Lome all good - Africa/Lome + Africa/Lome Africa/Luanda all good - Africa/Luanda + Africa/Luanda Africa/Lubumbashi all good - Africa/Lubumbashi + Africa/Lubumbashi Africa/Lusaka all good - Africa/Lusaka + Africa/Lusaka Africa/Malabo all good - Africa/Malabo + Africa/Malabo Africa/Maputo all good - Africa/Maputo + Africa/Maputo Africa/Maseru all good - Africa/Maseru + Africa/Maseru Africa/Mbabane all good - Africa/Mbabane + Africa/Mbabane Africa/Mogadishu all good - Africa/Mogadishu + Africa/Mogadishu Africa/Monrovia all good - Africa/Monrovia + Africa/Monrovia Africa/Nairobi all good - Africa/Nairobi + Africa/Nairobi Africa/Ndjamena all good - Africa/Ndjamena + Africa/Ndjamena Africa/Niamey all good - Africa/Niamey + Africa/Niamey Africa/Nouakchott all good - Africa/Nouakchott + Africa/Nouakchott Africa/Ouagadougou all good - Africa/Ouagadougou + Africa/Ouagadougou Africa/Porto-Novo all good - Africa/Porto-Novo + Africa/Porto-Novo Africa/Sao_Tome all good - Africa/Sao_Tome + Africa/Sao_Tome Africa/Tripoli all good - Africa/Tripoli + Africa/Tripoli Africa/Tunis all good - Africa/Tunis + Africa/Tunis Africa/Windhoek all good - Africa/Windhoek + Africa/Windhoek America/Adak all good - America/Adak + America/Adak America/Anchorage all good - America/Anchorage + America/Anchorage America/Anguilla all good - America/Anguilla + America/Anguilla America/Antigua all good - America/Antigua + America/Antigua America/Atikokan all good - America/Atikokan + America/Atikokan America/Bahia_Banderas all good - America/Bahia_Banderas + America/Bahia_Banderas America/Barbados all good - America/Barbados + America/Barbados America/Belize all good - America/Belize + America/Belize America/Blanc-Sablon all good - America/Blanc-Sablon + America/Blanc-Sablon America/Boise all good - America/Boise + America/Boise America/Cambridge_Bay all good - America/Cambridge_Bay + America/Cambridge_Bay America/Cancun all good - America/Cancun + America/Cancun America/Cayman all good - America/Cayman + America/Cayman America/Chicago all good - America/Chicago + America/Chicago America/Chihuahua all good - America/Chihuahua + America/Chihuahua America/Costa_Rica all good - America/Costa_Rica + America/Costa_Rica America/Danmarkshavn all good - America/Danmarkshavn + America/Danmarkshavn America/Dawson all good - America/Dawson + America/Dawson America/Dawson_Creek all good - America/Dawson_Creek + America/Dawson_Creek America/Denver all good - America/Denver + America/Denver America/Detroit all good - America/Detroit + America/Detroit America/Dominica all good - America/Dominica + America/Dominica America/Edmonton all good - America/Edmonton + America/Edmonton America/El_Salvador all good - America/El_Salvador + America/El_Salvador America/Glace_Bay all good - America/Glace_Bay + America/Glace_Bay America/Godthab all good - America/Godthab + America/Godthab America/Goose_Bay all good - America/Goose_Bay + America/Goose_Bay America/Grand_Turk all good - America/Grand_Turk + America/Grand_Turk America/Grenada all good - America/Grenada + America/Grenada America/Guadeloupe all good - America/Guadeloupe + America/Guadeloupe America/Guatemala all good - America/Guatemala + America/Guatemala America/Halifax all good - America/Halifax + America/Halifax America/Havana all good - America/Havana + America/Havana America/Hermosillo all good - America/Hermosillo + America/Hermosillo America/Indiana/Indianapolis all good - America/Indiana/Indianapolis + America/Indiana/Indianapolis America/Indiana/Knox all good - America/Indiana/Knox + America/Indiana/Knox America/Indiana/Marengo all good - America/Indiana/Marengo + America/Indiana/Marengo America/Indiana/Petersburg all good - America/Indiana/Petersburg + America/Indiana/Petersburg America/Indiana/Tell_City all good - America/Indiana/Tell_City + America/Indiana/Tell_City America/Indiana/Vevay all good - America/Indiana/Vevay + America/Indiana/Vevay America/Indiana/Vincennes all good - America/Indiana/Vincennes + America/Indiana/Vincennes America/Indiana/Winamac all good - America/Indiana/Winamac + America/Indiana/Winamac America/Inuvik all good - America/Inuvik + America/Inuvik America/Iqaluit all good - America/Iqaluit + America/Iqaluit America/Jamaica all good - America/Jamaica + America/Jamaica America/Juneau all good - America/Juneau + America/Juneau America/Kentucky/Louisville all good - America/Kentucky/Louisville + America/Kentucky/Louisville America/Kentucky/Monticello all good - America/Kentucky/Monticello + America/Kentucky/Monticello America/Los_Angeles all good - America/Los_Angeles + America/Los_Angeles America/Managua all good - America/Managua + America/Managua America/Marigot all good - America/Marigot + America/Marigot America/Martinique all good - America/Martinique + America/Martinique America/Matamoros all good - America/Matamoros + America/Matamoros America/Mazatlan all good - America/Mazatlan + America/Mazatlan America/Menominee all good - America/Menominee + America/Menominee America/Merida all good - America/Merida + America/Merida America/Metlakatla all good - America/Metlakatla + America/Metlakatla America/Mexico_City all good - America/Mexico_City + America/Mexico_City America/Miquelon all good - America/Miquelon + America/Miquelon America/Moncton all good - America/Moncton + America/Moncton America/Monterrey all good - America/Monterrey + America/Monterrey America/Montreal all good - America/Montreal + America/Montreal America/Montserrat all good - America/Montserrat + America/Montserrat America/Nassau all good - America/Nassau + America/Nassau America/New_York all good - America/New_York + America/New_York America/Nipigon all good - America/Nipigon + America/Nipigon America/Nome all good - America/Nome + America/Nome America/North_Dakota/Beulah all good - America/North_Dakota/Beulah + America/North_Dakota/Beulah America/North_Dakota/Center all good - America/North_Dakota/Center + America/North_Dakota/Center America/North_Dakota/New_Salem all good - America/North_Dakota/New_Salem + America/North_Dakota/New_Salem America/Ojinaga all good - America/Ojinaga + America/Ojinaga America/Panama all good - America/Panama + America/Panama America/Pangnirtung all good - America/Pangnirtung + America/Pangnirtung America/Phoenix all good - America/Phoenix + America/Phoenix America/Port-au-Prince all good - America/Port-au-Prince + America/Port-au-Prince America/Puerto_Rico all good - America/Puerto_Rico + America/Puerto_Rico America/Rainy_River all good - America/Rainy_River + America/Rainy_River America/Rankin_Inlet all good - America/Rankin_Inlet + America/Rankin_Inlet America/Regina all good - America/Regina + America/Regina America/Resolute all good - America/Resolute + America/Resolute America/Santa_Isabel all good - America/Santa_Isabel + America/Santa_Isabel America/Santo_Domingo all good - America/Santo_Domingo + America/Santo_Domingo America/Scoresbysund all good - America/Scoresbysund + America/Scoresbysund America/Shiprock all good - America/Shiprock + America/Shiprock America/Sitka all good - America/Sitka + America/Sitka America/St_Barthelemy all good - America/St_Barthelemy + America/St_Barthelemy America/St_Johns all good - America/St_Johns + America/St_Johns America/St_Kitts all good - America/St_Kitts + America/St_Kitts America/St_Lucia all good - America/St_Lucia + America/St_Lucia America/St_Thomas all good - America/St_Thomas + America/St_Thomas America/St_Vincent all good - America/St_Vincent + America/St_Vincent America/Swift_Current all good - America/Swift_Current + America/Swift_Current America/Tegucigalpa all good - America/Tegucigalpa + America/Tegucigalpa America/Thule all good - America/Thule + America/Thule America/Thunder_Bay all good - America/Thunder_Bay + America/Thunder_Bay America/Tijuana all good - America/Tijuana + America/Tijuana America/Toronto all good - America/Toronto + America/Toronto America/Tortola all good - America/Tortola + America/Tortola America/Vancouver all good - America/Vancouver + America/Vancouver America/Whitehorse all good - America/Whitehorse + America/Whitehorse America/Winnipeg all good - America/Winnipeg + America/Winnipeg America/Yakutat all good - America/Yakutat + America/Yakutat America/Yellowknife all good - America/Yellowknife + America/Yellowknife Antarctica/Casey all good - Antarctica/Casey + Antarctica/Casey Antarctica/Davis all good - Antarctica/Davis + Antarctica/Davis Antarctica/DumontDUrville all good - Antarctica/DumontDUrville + Antarctica/DumontDUrville Antarctica/Macquarie all good - Antarctica/Macquarie + Antarctica/Macquarie Antarctica/Mawson all good - Antarctica/Mawson + Antarctica/Mawson Antarctica/McMurdo all good - Antarctica/McMurdo + Antarctica/McMurdo Antarctica/Palmer all good - Antarctica/Palmer + Antarctica/Palmer Antarctica/Rothera all good - Antarctica/Rothera + Antarctica/Rothera Antarctica/South_Pole all good - Antarctica/South_Pole + Antarctica/South_Pole Antarctica/Syowa all good - Antarctica/Syowa + Antarctica/Syowa Antarctica/Vostok all good - Antarctica/Vostok + Antarctica/Vostok Arctic/Longyearbyen all good - Arctic/Longyearbyen + Arctic/Longyearbyen Asia/Aden all good - Asia/Aden + Asia/Aden Asia/Almaty all good - Asia/Almaty + Asia/Almaty Asia/Amman all good - Asia/Amman + Asia/Amman Asia/Anadyr all good - Asia/Anadyr + Asia/Anadyr Asia/Aqtau all good - Asia/Aqtau + Asia/Aqtau Asia/Aqtobe all good - Asia/Aqtobe + Asia/Aqtobe Asia/Ashgabat all good - Asia/Ashgabat + Asia/Ashgabat Asia/Baghdad all good - Asia/Baghdad + Asia/Baghdad Asia/Bahrain all good - Asia/Bahrain + Asia/Bahrain Asia/Baku all good - Asia/Baku + Asia/Baku Asia/Bangkok all good - Asia/Bangkok + Asia/Bangkok Asia/Beirut all good - Asia/Beirut + Asia/Beirut Asia/Bishkek all good - Asia/Bishkek + Asia/Bishkek Asia/Brunei all good - Asia/Brunei + Asia/Brunei Asia/Choibalsan all good - Asia/Choibalsan + Asia/Choibalsan Asia/Chongqing all good - Asia/Chongqing + Asia/Chongqing Asia/Colombo all good - Asia/Colombo + Asia/Colombo Asia/Damascus all good - Asia/Damascus + Asia/Damascus Asia/Dhaka all good - Asia/Dhaka + Asia/Dhaka Asia/Dili all good - Asia/Dili + Asia/Dili Asia/Dubai all good - Asia/Dubai + Asia/Dubai Asia/Dushanbe all good - Asia/Dushanbe + Asia/Dushanbe Asia/Gaza all good - Asia/Gaza + Asia/Gaza Asia/Harbin all good - Asia/Harbin + Asia/Harbin Asia/Ho_Chi_Minh all good - Asia/Ho_Chi_Minh + Asia/Ho_Chi_Minh Asia/Hong_Kong all good - Asia/Hong_Kong + Asia/Hong_Kong Asia/Hovd all good - Asia/Hovd + Asia/Hovd Asia/Irkutsk all good - Asia/Irkutsk + Asia/Irkutsk Asia/Istanbul all good - Asia/Istanbul + Asia/Istanbul Asia/Jakarta all good - Asia/Jakarta + Asia/Jakarta Asia/Jayapura all good - Asia/Jayapura + Asia/Jayapura Asia/Jerusalem all good - Asia/Jerusalem + Asia/Jerusalem Asia/Kabul all good - Asia/Kabul + Asia/Kabul Asia/Kamchatka all good - Asia/Kamchatka + Asia/Kamchatka Asia/Karachi all good - Asia/Karachi + Asia/Karachi Asia/Kashgar all good - Asia/Kashgar + Asia/Kashgar Asia/Kathmandu all good - Asia/Kathmandu + Asia/Kathmandu Asia/Kolkata all good - Asia/Kolkata + Asia/Kolkata Asia/Krasnoyarsk all good - Asia/Krasnoyarsk + Asia/Krasnoyarsk Asia/Kuala_Lumpur all good - Asia/Kuala_Lumpur + Asia/Kuala_Lumpur Asia/Kuching all good - Asia/Kuching + Asia/Kuching Asia/Kuwait all good - Asia/Kuwait + Asia/Kuwait Asia/Macau all good - Asia/Macau + Asia/Macau Asia/Magadan all good - Asia/Magadan + Asia/Magadan Asia/Makassar all good - Asia/Makassar + Asia/Makassar Asia/Manila all good - Asia/Manila + Asia/Manila Asia/Muscat all good - Asia/Muscat + Asia/Muscat Asia/Nicosia all good - Asia/Nicosia + Asia/Nicosia Asia/Novokuznetsk all good - Asia/Novokuznetsk + Asia/Novokuznetsk Asia/Novosibirsk all good - Asia/Novosibirsk + Asia/Novosibirsk Asia/Omsk all good - Asia/Omsk + Asia/Omsk Asia/Oral all good - Asia/Oral + Asia/Oral Asia/Phnom_Penh all good - Asia/Phnom_Penh + Asia/Phnom_Penh Asia/Pontianak all good - Asia/Pontianak + Asia/Pontianak Asia/Pyongyang all good - Asia/Pyongyang + Asia/Pyongyang Asia/Qatar all good - Asia/Qatar + Asia/Qatar Asia/Qyzylorda all good - Asia/Qyzylorda + Asia/Qyzylorda Asia/Rangoon all good - Asia/Rangoon + Asia/Rangoon Asia/Riyadh all good - Asia/Riyadh + Asia/Riyadh Asia/Sakhalin all good - Asia/Sakhalin + Asia/Sakhalin Asia/Samarkand all good - Asia/Samarkand + Asia/Samarkand Asia/Seoul all good - Asia/Seoul + Asia/Seoul Asia/Shanghai all good - Asia/Shanghai + Asia/Shanghai Asia/Singapore all good - Asia/Singapore + Asia/Singapore Asia/Taipei all good - Asia/Taipei + Asia/Taipei Asia/Tashkent all good - Asia/Tashkent + Asia/Tashkent Asia/Tbilisi all good - Asia/Tbilisi + Asia/Tbilisi Asia/Tehran all good - Asia/Tehran + Asia/Tehran Asia/Thimphu all good - Asia/Thimphu + Asia/Thimphu Asia/Tokyo all good - Asia/Tokyo + Asia/Tokyo Asia/Ulaanbaatar all good - Asia/Ulaanbaatar + Asia/Ulaanbaatar Asia/Urumqi all good - Asia/Urumqi + Asia/Urumqi Asia/Vientiane all good - Asia/Vientiane + Asia/Vientiane Asia/Vladivostok all good - Asia/Vladivostok + Asia/Vladivostok Asia/Yakutsk all good - Asia/Yakutsk + Asia/Yakutsk Asia/Yekaterinburg all good - Asia/Yekaterinburg + Asia/Yekaterinburg Asia/Yerevan all good - Asia/Yerevan + Asia/Yerevan Atlantic/Azores all good - Atlantic/Azores + Atlantic/Azores Atlantic/Bermuda all good - Atlantic/Bermuda + Atlantic/Bermuda Atlantic/Canary all good - Atlantic/Canary + Atlantic/Canary Atlantic/Cape_Verde all good - Atlantic/Cape_Verde + Atlantic/Cape_Verde Atlantic/Faroe all good - Atlantic/Faroe + Atlantic/Faroe Atlantic/Madeira all good - Atlantic/Madeira + Atlantic/Madeira Atlantic/Reykjavik all good - Atlantic/Reykjavik + Atlantic/Reykjavik Atlantic/St_Helena all good - Atlantic/St_Helena + Atlantic/St_Helena Australia/Adelaide all good - Australia/Adelaide + Australia/Adelaide Australia/Brisbane all good - Australia/Brisbane + Australia/Brisbane Australia/Broken_Hill all good - Australia/Broken_Hill + Australia/Broken_Hill Australia/Currie all good - Australia/Currie + Australia/Currie Australia/Darwin all good - Australia/Darwin + Australia/Darwin Australia/Eucla all good - Australia/Eucla + Australia/Eucla Australia/Hobart all good - Australia/Hobart + Australia/Hobart Australia/Lindeman all good - Australia/Lindeman + Australia/Lindeman Australia/Lord_Howe all good - Australia/Lord_Howe + Australia/Lord_Howe Australia/Melbourne all good - Australia/Melbourne + Australia/Melbourne Australia/Perth all good - Australia/Perth + Australia/Perth Australia/Sydney all good - Australia/Sydney + Australia/Sydney Europe/Amsterdam all good - Europe/Amsterdam + Europe/Amsterdam Europe/Andorra all good - Europe/Andorra + Europe/Andorra Europe/Athens all good - Europe/Athens + Europe/Athens Europe/Belgrade all good - Europe/Belgrade + Europe/Belgrade Europe/Berlin all good - Europe/Berlin + Europe/Berlin Europe/Bratislava all good - Europe/Bratislava + Europe/Bratislava Europe/Brussels all good - Europe/Brussels + Europe/Brussels Europe/Bucharest all good - Europe/Bucharest + Europe/Bucharest Europe/Budapest all good - Europe/Budapest + Europe/Budapest Europe/Chisinau all good - Europe/Chisinau + Europe/Chisinau Europe/Copenhagen all good - Europe/Copenhagen + Europe/Copenhagen Europe/Dublin all good - Europe/Dublin + Europe/Dublin Europe/Gibraltar all good - Europe/Gibraltar + Europe/Gibraltar Europe/Guernsey all good - Europe/Guernsey + Europe/Guernsey Europe/Helsinki all good - Europe/Helsinki + Europe/Helsinki Europe/Isle_of_Man all good - Europe/Isle_of_Man + Europe/Isle_of_Man Europe/Istanbul all good - Europe/Istanbul + Europe/Istanbul Europe/Jersey all good - Europe/Jersey + Europe/Jersey Europe/Kaliningrad all good - Europe/Kaliningrad + Europe/Kaliningrad Europe/Kiev all good - Europe/Kiev + Europe/Kiev Europe/Lisbon all good - Europe/Lisbon + Europe/Lisbon Europe/Ljubljana all good - Europe/Ljubljana + Europe/Ljubljana Europe/London all good - Europe/London + Europe/London Europe/Luxembourg all good - Europe/Luxembourg + Europe/Luxembourg Europe/Madrid all good - Europe/Madrid + Europe/Madrid Europe/Malta all good - Europe/Malta + Europe/Malta Europe/Mariehamn all good - Europe/Mariehamn + Europe/Mariehamn Europe/Minsk all good - Europe/Minsk + Europe/Minsk Europe/Monaco all good - Europe/Monaco + Europe/Monaco Europe/Moscow all good - Europe/Moscow + Europe/Moscow Europe/Nicosia all good - Europe/Nicosia + Europe/Nicosia Europe/Oslo all good - Europe/Oslo + Europe/Oslo Europe/Paris all good - Europe/Paris + Europe/Paris Europe/Podgorica all good - Europe/Podgorica + Europe/Podgorica Europe/Prague all good - Europe/Prague + Europe/Prague Europe/Riga all good - Europe/Riga + Europe/Riga Europe/Rome all good - Europe/Rome + Europe/Rome Europe/Samara all good - Europe/Samara + Europe/Samara Europe/San_Marino all good - Europe/San_Marino + Europe/San_Marino Europe/Sarajevo all good - Europe/Sarajevo + Europe/Sarajevo Europe/Simferopol all good - Europe/Simferopol + Europe/Simferopol Europe/Skopje all good - Europe/Skopje + Europe/Skopje Europe/Sofia all good - Europe/Sofia + Europe/Sofia Europe/Stockholm all good - Europe/Stockholm + Europe/Stockholm Europe/Tallinn all good - Europe/Tallinn + Europe/Tallinn Europe/Tirane all good - Europe/Tirane + Europe/Tirane Europe/Uzhgorod all good - Europe/Uzhgorod + Europe/Uzhgorod Europe/Vaduz all good - Europe/Vaduz + Europe/Vaduz Europe/Vatican all good - Europe/Vatican + Europe/Vatican Europe/Vienna all good - Europe/Vienna + Europe/Vienna Europe/Vilnius all good - Europe/Vilnius + Europe/Vilnius Europe/Volgograd all good - Europe/Volgograd + Europe/Volgograd Europe/Warsaw all good - Europe/Warsaw + Europe/Warsaw Europe/Zagreb all good - Europe/Zagreb + Europe/Zagreb Europe/Zaporozhye all good - Europe/Zaporozhye + Europe/Zaporozhye Europe/Zurich all good - Europe/Zurich + Europe/Zurich Indian/Antananarivo all good - Indian/Antananarivo + Indian/Antananarivo Indian/Chagos all good - Indian/Chagos + Indian/Chagos Indian/Christmas all good - Indian/Christmas + Indian/Christmas Indian/Cocos all good - Indian/Cocos + Indian/Cocos Indian/Comoro all good - Indian/Comoro + Indian/Comoro Indian/Kerguelen all good - Indian/Kerguelen + Indian/Kerguelen Indian/Mahe all good - Indian/Mahe + Indian/Mahe Indian/Maldives all good - Indian/Maldives + Indian/Maldives Indian/Mauritius all good - Indian/Mauritius + Indian/Mauritius Indian/Mayotte all good - Indian/Mayotte + Indian/Mayotte Indian/Reunion all good - Indian/Reunion + Indian/Reunion Pacific/Apia all good - Pacific/Apia + Pacific/Apia Pacific/Auckland all good - Pacific/Auckland + Pacific/Auckland Pacific/Chatham all good - Pacific/Chatham + Pacific/Chatham Pacific/Chuuk all good - Pacific/Chuuk + Pacific/Chuuk Pacific/Efate all good - Pacific/Efate + Pacific/Efate Pacific/Enderbury all good - Pacific/Enderbury + Pacific/Enderbury Pacific/Fakaofo all good - Pacific/Fakaofo + Pacific/Fakaofo Pacific/Fiji all good - Pacific/Fiji + Pacific/Fiji Pacific/Funafuti all good - Pacific/Funafuti + Pacific/Funafuti Pacific/Gambier all good - Pacific/Gambier + Pacific/Gambier Pacific/Guadalcanal all good - Pacific/Guadalcanal + Pacific/Guadalcanal Pacific/Guam all good - Pacific/Guam + Pacific/Guam Pacific/Honolulu all good - Pacific/Honolulu + Pacific/Honolulu Pacific/Johnston all good - Pacific/Johnston + Pacific/Johnston Pacific/Kiritimati all good - Pacific/Kiritimati + Pacific/Kiritimati Pacific/Kosrae all good - Pacific/Kosrae + Pacific/Kosrae Pacific/Kwajalein all good - Pacific/Kwajalein + Pacific/Kwajalein Pacific/Majuro all good - Pacific/Majuro + Pacific/Majuro Pacific/Marquesas all good - Pacific/Marquesas + Pacific/Marquesas Pacific/Midway all good - Pacific/Midway + Pacific/Midway Pacific/Nauru all good - Pacific/Nauru + Pacific/Nauru Pacific/Niue all good - Pacific/Niue + Pacific/Niue Pacific/Norfolk all good - Pacific/Norfolk + Pacific/Norfolk Pacific/Noumea all good - Pacific/Noumea + Pacific/Noumea Pacific/Pago_Pago all good - Pacific/Pago_Pago + Pacific/Pago_Pago Pacific/Palau all good - Pacific/Palau + Pacific/Palau Pacific/Pitcairn all good - Pacific/Pitcairn + Pacific/Pitcairn Pacific/Pohnpei all good - Pacific/Pohnpei + Pacific/Pohnpei Pacific/Port_Moresby all good - Pacific/Port_Moresby + Pacific/Port_Moresby Pacific/Rarotonga all good - Pacific/Rarotonga + Pacific/Rarotonga Pacific/Saipan all good - Pacific/Saipan + Pacific/Saipan Pacific/Tahiti all good - Pacific/Tahiti + Pacific/Tahiti Pacific/Tarawa all good - Pacific/Tarawa + Pacific/Tarawa Pacific/Tongatapu all good - Pacific/Tongatapu + Pacific/Tongatapu Pacific/Wake all good - Pacific/Wake + Pacific/Wake Pacific/Wallis all good - Pacific/Wallis + Pacific/Wallis diff --git a/testing/tests/timezone/5030-get.result b/testing/tests/timezone/5030-get.result index 590e1953..c4db6fc5 100644 --- a/testing/tests/timezone/5030-get.result +++ b/testing/tests/timezone/5030-get.result @@ -1,8 +1,10 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT ETag: "Some good etag" +Last-Modified: Dow, 01 Jan 2000 00:00:00 GMT +Content-Disposition: Attachment; Filename="Pacific-Auckland.ics" Content-Length: 3658 -Content-Type: text/calendar +Content-Type: text/calendar; charset=UTF-8 BEGIN:VCALENDAR VERSION:2.0 diff --git a/testing/tests/timezone/5031-get.result b/testing/tests/timezone/5031-get.result index 4b208def..0a61e413 100644 --- a/testing/tests/timezone/5031-get.result +++ b/testing/tests/timezone/5031-get.result @@ -1,8 +1,10 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT ETag: "Some good etag" +Last-Modified: Dow, 01 Jan 2000 00:00:00 GMT +Content-Disposition: Attachment; Filename="Europe-Madrid.ics" Content-Length: 611 -Content-Type: text/calendar +Content-Type: text/calendar; charset=UTF-8 BEGIN:VCALENDAR PRODID:-//Morphoss Ltd//NONSGML aCal//EN diff --git a/testing/tests/timezone/5032-get.result b/testing/tests/timezone/5032-get.result index 41997ac0..950dddb3 100644 --- a/testing/tests/timezone/5032-get.result +++ b/testing/tests/timezone/5032-get.result @@ -1,9 +1,9 @@ HTTP/1.1 403 Forbidden Date: Dow, 01 Jan 2000 00:00:00 GMT -Content-Length: 148 +Content-Length: 183 Content-Type: text/xml; charset="utf-8" - + This server currently only supports text/calendar format. \ No newline at end of file diff --git a/testing/tests/timezone/5033-get.result b/testing/tests/timezone/5033-get.result index 41997ac0..950dddb3 100644 --- a/testing/tests/timezone/5033-get.result +++ b/testing/tests/timezone/5033-get.result @@ -1,9 +1,9 @@ HTTP/1.1 403 Forbidden Date: Dow, 01 Jan 2000 00:00:00 GMT -Content-Length: 148 +Content-Length: 183 Content-Type: text/xml; charset="utf-8" - + This server currently only supports text/calendar format. \ No newline at end of file diff --git a/testing/tests/timezone/Restore-Database.result b/testing/tests/timezone/Restore-Database.result index b5610440..61b9de76 100644 --- a/testing/tests/timezone/Restore-Database.result +++ b/testing/tests/timezone/Restore-Database.result @@ -1,6 +1,6 @@ setval -------- - 1649 + 1651 (1 row) setval @@ -30,7 +30,7 @@ setval -------- - 11 + 12 (1 row) setval From d54ad8f488aee19041c2175929275d3bd42e8a68 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 23:32:41 +0200 Subject: [PATCH 27/29] New function for getting the earliest_start -> latest_end for a VCalendar Including a new RepeatRuleDateRange class and other ancillary methods. --- inc/RRule-v2.php | 153 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 149 insertions(+), 4 deletions(-) diff --git a/inc/RRule-v2.php b/inc/RRule-v2.php index eb0959ab..b949e5e8 100644 --- a/inc/RRule-v2.php +++ b/inc/RRule-v2.php @@ -513,6 +513,56 @@ class RepeatRuleDateTime extends DateTime { } +/** + * This class is used to hold a pair of dates defining a range. The range may be open-ended by including + * a null for one end or the other, or both. + * + * @author Andrew McMillan + */ +class RepeatRuleDateRange { + public $from; + public $until; + + /** + * Construct a new RepeatRuleDateRange which will be the range between $date1 and $date2. The earliest of the two + * dates will be used as the start of the period, the latest as the end. If one of the dates is null then the order + * of the parameters is significant, with the null treated as -infinity if it is first, or +infinity if it is second. + * If both parameters are null then the range is from -infinity to +infinity. + * + * @param RepeatRuleDateTime $date1 + * @param RepeatRuleDateTime $date2 + */ + function __construct( $date1, $date2 ) { + if ( $date1 != null && $date2 != null && $date1 > $date2 ) { + $this->from = $date2; + $this->until = $date1; + } + else { + $this->from = $date1; + $this->until = $date2; + } + } + + /** + * Assess whether this range overlaps the supplied range. null values are treated as infinity. + * @param RepeatRuleDateRange $other + * @return boolean + */ + function overlaps( RepeatRuleDateRange $other ) { + if ( ($this->until == null && $this->from == null) || ($other->until == null && $other->from == null ) ) return true; + if ( $this->until == null && $other->until == null ) return true; + if ( $this->from == null && $other->from == null ) return true; + + if ( $this->until == null ) return ($other->until > $this->from); + if ( $this->from == null ) return ($other->from < $this->until); + if ( $other->until == null ) return ($this->until > $other->from); + if ( $other->from == null ) return ($thi->from < $other->until); + + return !( $this->until < $other->from || $this->from > $other->until ); + } +} + + /** * This class is an implementation of RRULE parsing and expansion, as per RFC5545. It should be reasonably * complete, except that it does not handle changing the WKST - there may be a few errors in unusual rules @@ -594,6 +644,15 @@ class RepeatRule { } + /** + * If this repeat rule has an UNTIL= or COUNT= then we can know it will end. Eventually. + * @return boolean Whether or not one of these properties is present. + */ + public function hasLimitedOccurrences() { + return ( isset($this->count) || isset($this->until) ); + } + + public function set_timezone( $tzstring ) { $this->base->setTimezone(new DateTimeZone($tzstring)); } @@ -606,7 +665,7 @@ class RepeatRule { $this->finished = false; } - + public function rewind() { $this->position = -1; } @@ -1019,6 +1078,7 @@ class RepeatRule { } + require_once("vComponent.php"); /** @@ -1104,11 +1164,13 @@ function expand_event_instances( $vResource, $range_start = null, $range_end = n global $c; $components = $vResource->GetComponents(); - if ( !isset($range_start) ) { $range_start = new RepeatRuleDateTime(); $range_start->modify('-6 weeks'); } - if ( !isset($range_end) ) { $range_end = clone($range_start); $range_end->modify('+6 months'); } + if ( empty($range_start) ) { $range_start = new RepeatRuleDateTime(); $range_start->modify('-6 weeks'); } + if ( empty($range_end) ) { + $range_end = clone($range_start); + $range_end->modify('+6 months'); + } $new_components = array(); - $result_limit = 1000; $instances = array(); $expand = false; $dtstart = null; @@ -1304,3 +1366,86 @@ function expand_event_instances( $vResource, $range_start = null, $range_end = n return $vResource; } + + +/** +* Return a RepeatRuleDateRange from the earliest start to the latest end of the event. +* +* @todo: This should probably be made part of the VCalendar object when we move the RRule.php into AWL. +* +* @param object $vResource A vComponent which is a VCALENDAR containing components needing expansion +* @return RepeatRuleDateRange Representing the range of time covered by the event. +*/ +function getVCalendarRange( $vResource ) { + global $c; + $components = $vResource->GetComponents(); + + $dtstart = null; + $duration = null; + $earliest_start = null; + $latest_end = null; + $has_repeats = false; + foreach( $components AS $k => $comp ) { + $dtstart_prop = $comp->GetProperty('DTSTART'); + $dtend_prop = $comp->GetProperty('DTEND'); + $due_prop = $comp->GetProperty('DUE'); + + if ( isset($dtstart_prop) ) + $dtstart = new RepeatRuleDateTime( $dtstart_prop ); + else if ( isset($due_prop) ) + $dtstart = new RepeatRuleDateTime( $due_prop ); + else if ( isset($dtend_prop) ) + $dtstart = new RepeatRuleDateTime( $dtend_prop ); + else + continue; + + $duration_prop = $comp->GetProperty('DURATION'); + if ( empty($dtend_prop) ) { + if ( empty($duration_prop) ) { + $duration = new Rfc5545Duration(0); + } + else { + $duration = new Rfc5545Duration($duration_prop->Value()); + } + } + else { + $dtend = new RepeatRuleDateTime( $dtend_prop ); + $duration = new Rfc5545Duration($dtend->epoch() - $dtstart->epoch()); + } + + $rrule = $comp->GetProperty('RRULE'); + $limited_occurrences = true; + if ( isset($rrule) ) { + $rule = new RepeatRule($dtstart, $rrule); + $limited_occurrences = $rule->hasLimitedOccurrences(); + } + + if ( $limited_occurrences ) { + $instances = array(); + $instances[$dtstart->FloatOrUTC()] = $dtstart; + if ( !isset($range_end) ) { + $range_end = new RepeatRuleDateTime(); + $range_end->modify('+150 years'); + } + $instances += rrule_expand($dtstart, 'RRULE', $comp, $range_end); + $instances += rdate_expand($dtstart, 'RDATE', $comp, $range_end); + foreach ( rdate_expand($dtstart, 'EXDATE', $comp, $range_end) AS $k => $v ) { + unset($instances[$k]); + } + $instances = array_keys($instances); + asort($instances); + $first = new RepeatRuleDateTime($instances[0]); + $last = new RepeatRuleDateTime($instances[count($instances)-1]); + $last->modify($duration); + if ( empty($earliest_start) || $first < $earliest_start ) $earliest_start = $first; + if ( empty($latest_end) || $last > $latest_end ) $latest_end = $last; + } + else { + if ( empty($earliest_start) || $dtstart < $earliest_start ) $earliest_start = $dtstart; + $latest_end = null; + break; + } + } + + return new RepeatRuleDateRange($earliest_start, $latest_end ); +} From e913600c70aba289ee973ce733f973f375bfbe28 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 6 Oct 2011 23:34:18 +0200 Subject: [PATCH 28/29] Switch calendar query to new getVCalendarRange() function. This fixes various bugs in time-range handling. --- inc/caldav-REPORT-calquery.php | 15 +++-- .../regression-suite/0236-Moz-REPORT.result | 64 ++++++++++++++++++- .../regression-suite/0236-Moz-REPORT.test | 13 ++-- .../regression-suite/0559-iOS-REPORT.result | 62 ++++++++++++++++++ .../regression-suite/0559-iOS-REPORT.test | 43 +++++++++++++ 5 files changed, 185 insertions(+), 12 deletions(-) create mode 100644 testing/tests/regression-suite/0559-iOS-REPORT.result create mode 100644 testing/tests/regression-suite/0559-iOS-REPORT.test diff --git a/inc/caldav-REPORT-calquery.php b/inc/caldav-REPORT-calquery.php index 311ba5e8..8419c243 100644 --- a/inc/caldav-REPORT-calquery.php +++ b/inc/caldav-REPORT-calquery.php @@ -87,9 +87,9 @@ function apply_filter( $filters, $item ) { * Process a filter fragment returning an SQL fragment */ $need_post_filter = false; -$need_range_filter = false; +$range_filter = null; function SqlFilterFragment( $filter, $components, $property = null, $parameter = null ) { - global $need_post_filter, $need_range_filter, $target_collection; + global $need_post_filter, $range_filter, $target_collection; $sql = ""; $params = array(); if ( !is_array($filter) ) { @@ -160,7 +160,8 @@ function SqlFilterFragment( $filter, $components, $property = null, $parameter = } @dbg_error_log('calquery', 'filter-sql: %s', $sql); @dbg_error_log('calquery', 'time-range-start: %s, time-range-end: %s, ', $params[':time_range_start'], $params[':time_range_end']); - $need_range_filter = array(new RepeatRuleDateTime($start),new RepeatRuleDateTime($finish)); + $range_filter = new RepeatRuleDateRange((empty($start) ? null : new RepeatRuleDateTime($start)), + (empty($finish)? null : new RepeatRuleDateTime($finish))); break; case 'urn:ietf:params:xml:ns:caldav:text-match': @@ -344,10 +345,12 @@ if ( $qry->Exec("calquery",__LINE__,__FILE__) && $qry->rows() > 0 ) { if ( $expanded->ComponentCount() == 0 ) continue; if ( $need_expansion ) $calendar_object->caldav_data = $expanded->Render(); } - else if ( $need_range_filter ) { + else if ( isset($range_filter) ) { $vResource = new vComponent($calendar_object->caldav_data); - $expanded = expand_event_instances($vResource, $need_range_filter[0], $need_range_filter[1]); - if ( $expanded->ComponentCount() == 0 ) continue; + $expanded = getVCalendarRange($vResource); + dbg_error_log('calquery', 'Expanded to %s:%s which might overlap %s:%s', + $expanded->from, $expanded->until, $range_filter->from, $range_filter->until ); + if ( !$expanded->overlaps($range_filter) ) continue; } $responses[] = calendar_to_xml( $properties, $calendar_object ); } diff --git a/testing/tests/regression-suite/0236-Moz-REPORT.result b/testing/tests/regression-suite/0236-Moz-REPORT.result index 717ece3d..66590954 100644 --- a/testing/tests/regression-suite/0236-Moz-REPORT.result +++ b/testing/tests/regression-suite/0236-Moz-REPORT.result @@ -2,12 +2,62 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook -ETag: "882eeadb4b2e998ed4358acda515e963" -Content-Length: 1421 +ETag: "ab07e565993a377f23fc062109bbf013" +Content-Length: 2857 Content-Type: text/xml; charset="utf-8" + + /caldav.php/user1/home/2178279a-aec2-471f-832d-1f6df6203f2f.ics + + + "509b0f0d8a3363379f9f5727f5dd74a0" + BEGIN:VCALENDAR +PRODID:-//Mozilla Calendar//NONSGML Sunbird//EN +VERSION:2.0 +BEGIN:VTODO +CREATED:20070805T200215Z +LAST-MODIFIED:20070805T201531Z +DTSTAMP:20070805T200215Z +UID:2178279a-aec2-471f-832d-1f6df6203f2f +SUMMARY:Incomplete\, uncancelled +X-MOZ-LOCATIONPATH:2178279a-aec2-471f-832d-1f6df6203f2f.ics +DESCRIPTION:This task is incomplete and has not been cancelled (has no + status at all) +END:VTODO +END:VCALENDAR + + + HTTP/1.1 200 OK + + + + /caldav.php/user1/home/917b9e47-b748-4550-a566-657fbe672447.ics + + + "cb3d9dc3e8c157f53eba3ea0e1e0f146" + BEGIN:VCALENDAR +PRODID:-//Mozilla Calendar//NONSGML Sunbird//EN +VERSION:2.0 +BEGIN:VTODO +CREATED:20070805T201557Z +LAST-MODIFIED:20070805T201643Z +DTSTAMP:20070805T201557Z +UID:917b9e47-b748-4550-a566-657fbe672447 +SUMMARY:50% Complete\, uncancelled +STATUS:IN-PROCESS +PERCENT-COMPLETE:50 +X-MOZ-LOCATIONPATH:917b9e47-b748-4550-a566-657fbe672447.ics +DESCRIPTION:This task is in progress (50% complete) and has not been + cancelled. +END:VTODO +END:VCALENDAR + + + HTTP/1.1 200 OK + + /caldav.php/user1/home/e6eb5bc9-f7f9-4a0a-94e8-8e90eefc7d08.ics @@ -59,6 +109,16 @@ END:VCALENDAR + dtstart: >NULL< + due: >NULL< + rrule: >NULL< + summary: >Incomplete, uncancelled< + + dtstart: >NULL< + due: >NULL< + rrule: >NULL< + summary: >50% Complete, uncancelled< + dtstart: >2007-12-09 13:30:00+13< due: >2007-12-09 13:30:00+13< rrule: >NULL< diff --git a/testing/tests/regression-suite/0236-Moz-REPORT.test b/testing/tests/regression-suite/0236-Moz-REPORT.test index 9776690c..b96efa19 100644 --- a/testing/tests/regression-suite/0236-Moz-REPORT.test +++ b/testing/tests/regression-suite/0236-Moz-REPORT.test @@ -35,9 +35,14 @@ SELECT dtstart, due, FROM calendar_item JOIN caldav_data USING (dav_id) WHERE calendar_item.dav_name ~ '^/user1/home/' AND caldav_data.caldav_type = 'VTODO' - AND (rrule IS NOT NULL - OR (dtstart >= '20071101T110000Z' AND dtstart < '20080104T110000Z') - OR (due >= '20071101T110000Z' AND dtstart < '20080104T110000Z') - ) + AND (rrule IS NOT NULL OR dtstart IS NULL + OR ( + ( + (due IS NULL AND dtstart > '20071101T110000Z') + OR due > '20071101T110000Z' + ) + AND dtstart < '20080104T110000Z' + ) + ) ENDQUERY diff --git a/testing/tests/regression-suite/0559-iOS-REPORT.result b/testing/tests/regression-suite/0559-iOS-REPORT.result new file mode 100644 index 00000000..b102c654 --- /dev/null +++ b/testing/tests/regression-suite/0559-iOS-REPORT.result @@ -0,0 +1,62 @@ +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 +DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule +ETag: "8b72e0eb2a2a3afd42cf96e4df5e9974" +Content-Length: 950 +Content-Type: text/xml; charset="utf-8" + + + + + /caldav.php/user1/home/e70576e9-c1e0-431e-a507-0386fd82f223.ics + + + "e8060931f30c1798ac58ffbe4ec0bffc" + text/calendar + + HTTP/1.1 200 OK + + + + /caldav.php/user1/home/da81c0ee-7871-11db-c6d6-f6927c144649.ics + + + "6f16959eee5c920b45548840b1e9ea19" + text/calendar + + HTTP/1.1 200 OK + + + + /caldav.php/user1/home/0544-gzip-PUT.ics + + + "6ddd18264a9d40c1c9d37a005eeb7e4f" + text/calendar + + HTTP/1.1 200 OK + + + + + dav_name: >/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics< + dtstart: >2006-11-02 10:00:00+13< + rrule: >FREQ=WEEKLY;COUNT=26;INTERVAL=1;BYDAY=TH< + + dav_name: >/user1/home/e70576e9-c1e0-431e-a507-0386fd82f223.ics< + dtstart: >2007-12-11 07:45:00+13< + rrule: >FREQ=WEEKLY;INTERVAL=1;BYDAY=TU,TH< + + dav_name: >/user1/home/71e2ae82-7870-11db-c6d6-f6927c144649.ics< + dtstart: >2006-11-03 16:00:00+13< + rrule: >FREQ=WEEKLY;INTERVAL=2;UNTIL=20071222T235900< + + dav_name: >/user1/home/da81c0ee-7871-11db-c6d6-f6927c144649.ics< + dtstart: >2006-11-03 07:30:00+13< + rrule: >FREQ=MONTHLY< + + dav_name: >/user1/home/0544-gzip-PUT.ics< + dtstart: >2011-10-05 14:00:00+13< + rrule: >NULL< + diff --git a/testing/tests/regression-suite/0559-iOS-REPORT.test b/testing/tests/regression-suite/0559-iOS-REPORT.test new file mode 100644 index 00000000..c8bf923c --- /dev/null +++ b/testing/tests/regression-suite/0559-iOS-REPORT.test @@ -0,0 +1,43 @@ +# +# Testing with a process similar to iPhone 5 +# +TYPE=REPORT +URL=http://mycaldav/caldav.php/user1/home/ +HEAD + +AUTH=user1:user1 + +HEADER=User-Agent: iOS/10.7.2 (11C35) dataaccessd/1.0 +HEADER=Content-Type: text/xml +HEADER=Depth: 1 + +# +BEGINDATA + + + + + + + + + + + + + + +ENDDATA + +# +QUERY +SELECT caldav_data.dav_name, dtstart, rrule + FROM calendar_item JOIN caldav_data USING(dav_id) + WHERE caldav_data.dav_name ~ '^/user1/home/' + AND caldav_data.caldav_type = 'VEVENT' + AND (rrule IS NOT NULL OR dtstart IS NULL + OR ( (dtend IS NULL AND dtstart > '20110922T000000Z') + OR dtend > '20110922T000000Z' + ) + ) +ENDQUERY From 5b921b3884074df57b30d738ec4abf8ab452d703 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 7 Oct 2011 07:34:49 +0200 Subject: [PATCH 29/29] Test for 'deflate' content encoding. --- testing/tests/binding/1000-BIND.result | 2 +- testing/tests/binding/1001-BIND.result | 2 +- .../tests/binding/1004-PROPFIND-bound.result | 2 +- testing/tests/binding/1012-BIND.result | 4 +-- testing/tests/binding/1022-BIND.result | 6 ++-- testing/tests/binding/1023-BIND.result | 8 ++--- testing/tests/binding/1024-BIND.result | 8 ++--- testing/tests/binding/1025-PROPFIND.result | 4 +-- testing/tests/binding/1027-PROPFIND.result | 2 +- testing/tests/binding/1032-BIND-admin.result | 10 +++--- .../binding/1034-DELETE-admin-bind.result | 4 +-- testing/tests/binding/1035-GET-mashup.result | 30 +++++++++++++++- testing/tests/binding/1100-BIND.result | 12 +++---- .../tests/binding/1101-PROPFIND-normal.result | 6 ++-- .../tests/binding/1102-PROPFIND-bound.result | 6 ++-- testing/tests/binding/Restore-Database.result | 4 +-- testing/tests/carddav/Restore-Database.result | 4 +-- .../regression-suite/0545-deflate-PUT.data | 3 ++ .../0545-iCLoud-PUT-encoded.result | 8 +++++ .../0545-iCLoud-PUT-encoded.test | 14 ++++++++ .../0553-iPhone-PROPFIND.result | 4 +-- .../0554-iPhone-PROPFIND.result | 4 +-- .../0555-iPhone-REPORT.result | 14 ++++++-- .../regression-suite/0559-iOS-REPORT.result | 18 ++++++++-- .../0598-REPORT-sync-initial.result | 13 +++++-- .../0599-REPORT-sync-changed.result | 13 +++++-- .../0602-Soho-PROPFIND.result | 26 ++++++++++++-- .../0822-Spec-PROPFIND-3.result | 35 +++++++++++++++++++ .../0901-GET-Collection.result | 30 +++++++++++++++- .../0902-PUT-collection.result | 2 +- .../tests/regression-suite/0924-MOVE.result | 4 +-- .../1100-REPORT-sync-changed.result | 14 ++++++-- .../tests/scheduling/Restore-Database.result | 4 +-- testing/tests/timezone/5010-list.result | 9 ++++- .../tests/timezone/Restore-Database.result | 4 +-- 35 files changed, 265 insertions(+), 68 deletions(-) create mode 100644 testing/tests/regression-suite/0545-deflate-PUT.data create mode 100644 testing/tests/regression-suite/0545-iCLoud-PUT-encoded.result create mode 100644 testing/tests/regression-suite/0545-iCLoud-PUT-encoded.test diff --git a/testing/tests/binding/1000-BIND.result b/testing/tests/binding/1000-BIND.result index 353b0a8e..dadb016a 100644 --- a/testing/tests/binding/1000-BIND.result +++ b/testing/tests/binding/1000-BIND.result @@ -7,7 +7,7 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1601< + bind_id: >1602< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/user2/< diff --git a/testing/tests/binding/1001-BIND.result b/testing/tests/binding/1001-BIND.result index f10b1248..d5973c08 100644 --- a/testing/tests/binding/1001-BIND.result +++ b/testing/tests/binding/1001-BIND.result @@ -9,7 +9,7 @@ Content-Type: text/xml; charset="utf-8" A resource already exists at the destination. - bind_id: >1601< + bind_id: >1602< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/user2/< diff --git a/testing/tests/binding/1004-PROPFIND-bound.result b/testing/tests/binding/1004-PROPFIND-bound.result index d3717e62..eddca1c2 100644 --- a/testing/tests/binding/1004-PROPFIND-bound.result +++ b/testing/tests/binding/1004-PROPFIND-bound.result @@ -118,7 +118,7 @@ User 4 Outbox - /caldav.php/.resources/1599 + /caldav.php/.resources/1600 diff --git a/testing/tests/binding/1012-BIND.result b/testing/tests/binding/1012-BIND.result index 7edf19d9..4f8397b2 100644 --- a/testing/tests/binding/1012-BIND.result +++ b/testing/tests/binding/1012-BIND.result @@ -7,14 +7,14 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1601< + bind_id: >1602< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< parent_container: >/user4/< ticket_id_length: >8< - bind_id: >1602< + bind_id: >1603< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< diff --git a/testing/tests/binding/1022-BIND.result b/testing/tests/binding/1022-BIND.result index e99edf0c..245b5409 100644 --- a/testing/tests/binding/1022-BIND.result +++ b/testing/tests/binding/1022-BIND.result @@ -7,21 +7,21 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1601< + bind_id: >1602< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< length: >8< parent_container: >/user4/< - bind_id: >1602< + bind_id: >1603< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< length: >8< parent_container: >/user4/< - bind_id: >1606< + bind_id: >1607< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< diff --git a/testing/tests/binding/1023-BIND.result b/testing/tests/binding/1023-BIND.result index a843d9fb..85c0dc10 100644 --- a/testing/tests/binding/1023-BIND.result +++ b/testing/tests/binding/1023-BIND.result @@ -7,28 +7,28 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1601< + bind_id: >1602< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< length: >8< parent_container: >/user4/< - bind_id: >1602< + bind_id: >1603< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< length: >8< parent_container: >/user4/< - bind_id: >1606< + bind_id: >1607< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< length: >8< parent_container: >/user4/base/< - bind_id: >1607< + bind_id: >1608< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/base/user2/< diff --git a/testing/tests/binding/1024-BIND.result b/testing/tests/binding/1024-BIND.result index 0b71d540..8bc19aed 100644 --- a/testing/tests/binding/1024-BIND.result +++ b/testing/tests/binding/1024-BIND.result @@ -9,28 +9,28 @@ Content-Type: text/xml; charset="utf-8" A resource already exists at the destination. - bind_id: >1601< + bind_id: >1602< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< length: >8< parent_container: >/user4/< - bind_id: >1602< + bind_id: >1603< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< length: >8< parent_container: >/user4/< - bind_id: >1606< + bind_id: >1607< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< length: >8< parent_container: >/user4/base/< - bind_id: >1607< + bind_id: >1608< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/base/user2/< diff --git a/testing/tests/binding/1025-PROPFIND.result b/testing/tests/binding/1025-PROPFIND.result index 155d7f04..c4cdbcfc 100644 --- a/testing/tests/binding/1025-PROPFIND.result +++ b/testing/tests/binding/1025-PROPFIND.result @@ -6,7 +6,7 @@ A normal collection - /caldav.php/.resources/1604 + /caldav.php/.resources/1605 @@ -90,7 +90,7 @@ A sub collection - /caldav.php/.resources/1605 + /caldav.php/.resources/1606 diff --git a/testing/tests/binding/1027-PROPFIND.result b/testing/tests/binding/1027-PROPFIND.result index 6d61d644..1d0e95d0 100644 --- a/testing/tests/binding/1027-PROPFIND.result +++ b/testing/tests/binding/1027-PROPFIND.result @@ -6,7 +6,7 @@ A normal collection - /caldav.php/.resources/1604 + /caldav.php/.resources/1605 diff --git a/testing/tests/binding/1032-BIND-admin.result b/testing/tests/binding/1032-BIND-admin.result index 6a3e155e..fbf94101 100644 --- a/testing/tests/binding/1032-BIND-admin.result +++ b/testing/tests/binding/1032-BIND-admin.result @@ -7,7 +7,7 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1601< + bind_id: >1602< bind_owner: >1005< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< @@ -19,7 +19,7 @@ target_collection: >11< target_resource_i: >NULL< ticket_owner: >1003< - bind_id: >1602< + bind_id: >1603< bind_owner: >1005< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< @@ -31,7 +31,7 @@ target_collection: >10< target_resource_i: >NULL< ticket_owner: >1002< - bind_id: >1606< + bind_id: >1607< bind_owner: >1005< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< @@ -43,7 +43,7 @@ target_collection: >10< target_resource_i: >NULL< ticket_owner: >1002< - bind_id: >1607< + bind_id: >1608< bind_owner: >1005< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< @@ -55,7 +55,7 @@ target_collection: >11< target_resource_i: >NULL< ticket_owner: >1003< - bind_id: >1628< + bind_id: >1629< bind_owner: >1< bound_source_id: >12< dav_displayname: >user3 home< diff --git a/testing/tests/binding/1034-DELETE-admin-bind.result b/testing/tests/binding/1034-DELETE-admin-bind.result index 3bab3301..3aabc725 100644 --- a/testing/tests/binding/1034-DELETE-admin-bind.result +++ b/testing/tests/binding/1034-DELETE-admin-bind.result @@ -6,14 +6,14 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1606< + bind_id: >1607< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< dav_owner_id: >1005< parent_container: >/user4/base/< - bind_id: >1607< + bind_id: >1608< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/base/user2/< diff --git a/testing/tests/binding/1035-GET-mashup.result b/testing/tests/binding/1035-GET-mashup.result index 9d794fd3..fcd40f3a 100644 --- a/testing/tests/binding/1035-GET-mashup.result +++ b/testing/tests/binding/1035-GET-mashup.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -Content-Length: 21698 +Content-Length: 22330 Etag: "ae93907cb03bc025b8e733eb61f3a09e" Content-Type: text/calendar; charset="utf-8" @@ -319,6 +319,16 @@ DTSTAMP:20111004T153507Z SEQUENCE:1 END:VEVENT BEGIN:VEVENT +CREATED:20111004T153507Z +UID:0545-deflate-PUT +TRANSP:OPAQUE +SUMMARY:In Prague, 10am, Oct 7th for 1 hour +DTSTART;TZID=Prague_in_Central_Europe:20111007T100000 +DURATION:PT1H +DTSTAMP:20111004T153507Z +SEQUENCE:1 +END:VEVENT +BEGIN:VEVENT DESCRIPTION:Have a party. All the best parties are monthly! UID:DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74 DTSTAMP:20081024T220925Z @@ -712,4 +722,22 @@ TZNAME:GMT+01:00 TZOFFSETTO:+0100 END:STANDARD END:VTIMEZONE +BEGIN:VTIMEZONE +TZID:Prague_in_Central_Europe +X-MICROSOFT-CDO-TZID:4 +BEGIN:DAYLIGHT +TZOFFSETFROM:+0100 +RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU +DTSTART:19810329T020000 +TZNAME:GMT+02:00 +TZOFFSETTO:+0200 +END:DAYLIGHT +BEGIN:STANDARD +TZOFFSETFROM:+0200 +RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU +DTSTART:19961027T030000 +TZNAME:GMT+01:00 +TZOFFSETTO:+0100 +END:STANDARD +END:VTIMEZONE END:VCALENDAR diff --git a/testing/tests/binding/1100-BIND.result b/testing/tests/binding/1100-BIND.result index b09a95e6..f61e90ec 100644 --- a/testing/tests/binding/1100-BIND.result +++ b/testing/tests/binding/1100-BIND.result @@ -7,36 +7,36 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - bind_id: >1601< + bind_id: >1602< bound_source_id: >11< dav_displayname: >Updated Displayname with PROPPATCH< dav_name: >/user4/user2/< length: >8< parent_container: >/user4/< - bind_id: >1602< + bind_id: >1603< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/user1/< length: >8< parent_container: >/user4/< - bind_id: >1606< + bind_id: >1607< bound_source_id: >10< dav_displayname: >User 1's Calendaranza< dav_name: >/user4/base/user1/< length: >8< parent_container: >/user4/base/< - bind_id: >1607< + bind_id: >1608< bound_source_id: >11< dav_displayname: >User 2's Calendar, as uploaded by Admin< dav_name: >/user4/base/user2/< length: >8< parent_container: >/user4/base/< - bind_id: >1629< - bound_source_id: >1604< + bind_id: >1630< + bound_source_id: >1605< dav_displayname: >A normal collection< dav_name: >/user4/boundbase/< length: >NULL< diff --git a/testing/tests/binding/1101-PROPFIND-normal.result b/testing/tests/binding/1101-PROPFIND-normal.result index b542230b..649501cd 100644 --- a/testing/tests/binding/1101-PROPFIND-normal.result +++ b/testing/tests/binding/1101-PROPFIND-normal.result @@ -6,7 +6,7 @@ A normal collection - /caldav.php/.resources/1604 + /caldav.php/.resources/1605 @@ -90,7 +90,7 @@ A sub collection - /caldav.php/.resources/1605 + /caldav.php/.resources/1606 @@ -112,7 +112,7 @@ newcalendar - /caldav.php/.resources/1618 + /caldav.php/.resources/1619 diff --git a/testing/tests/binding/1102-PROPFIND-bound.result b/testing/tests/binding/1102-PROPFIND-bound.result index 70cdfcff..b4cc683f 100644 --- a/testing/tests/binding/1102-PROPFIND-bound.result +++ b/testing/tests/binding/1102-PROPFIND-bound.result @@ -6,7 +6,7 @@ A normal collection - /caldav.php/.resources/1604 + /caldav.php/.resources/1605 @@ -99,7 +99,7 @@ A sub collection - /caldav.php/.resources/1605 + /caldav.php/.resources/1606 @@ -125,7 +125,7 @@ newcalendar - /caldav.php/.resources/1618 + /caldav.php/.resources/1619 diff --git a/testing/tests/binding/Restore-Database.result b/testing/tests/binding/Restore-Database.result index 9fbcd37f..2a81253e 100644 --- a/testing/tests/binding/Restore-Database.result +++ b/testing/tests/binding/Restore-Database.result @@ -1,6 +1,6 @@ setval -------- - 1600 + 1601 (1 row) setval @@ -30,7 +30,7 @@ setval -------- - 12 + 13 (1 row) setval diff --git a/testing/tests/carddav/Restore-Database.result b/testing/tests/carddav/Restore-Database.result index 5388b0a6..25703e47 100644 --- a/testing/tests/carddav/Restore-Database.result +++ b/testing/tests/carddav/Restore-Database.result @@ -1,6 +1,6 @@ setval -------- - 1629 + 1630 (1 row) setval @@ -30,7 +30,7 @@ setval -------- - 12 + 13 (1 row) setval diff --git a/testing/tests/regression-suite/0545-deflate-PUT.data b/testing/tests/regression-suite/0545-deflate-PUT.data new file mode 100644 index 00000000..dfb556d2 --- /dev/null +++ b/testing/tests/regression-suite/0545-deflate-PUT.data @@ -0,0 +1,3 @@ +}Ao0!vQ\q0:/"6hpطCh+m99{^ʕ2l4;.SְhDPPaXTe:Fa(>WdDP YOa+'W)nr`rgD-xթk< +=Zf6 6\!Zg$$$jvG(!ȹܗM|ZM,5^\4ˑ F9 ^[ec(gOK`>.O_J.4FI427B*i|e|\n;A +J xJf;ht2 ^4:nٔ?eL0{LICg]_S\7~d b\пz`5^Ēѡա \ No newline at end of file diff --git a/testing/tests/regression-suite/0545-iCLoud-PUT-encoded.result b/testing/tests/regression-suite/0545-iCLoud-PUT-encoded.result new file mode 100644 index 00000000..89e3ea36 --- /dev/null +++ b/testing/tests/regression-suite/0545-iCLoud-PUT-encoded.result @@ -0,0 +1,8 @@ +HTTP/1.1 201 Created +Date: Dow, 01 Jan 2000 00:00:00 GMT +DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule +DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule +ETag: "4a3aa58a3e11487e87d87024465d4182" +Content-Length: 0 +Content-Type: text/plain; charset="utf-8" + diff --git a/testing/tests/regression-suite/0545-iCLoud-PUT-encoded.test b/testing/tests/regression-suite/0545-iCLoud-PUT-encoded.test new file mode 100644 index 00000000..60092650 --- /dev/null +++ b/testing/tests/regression-suite/0545-iCLoud-PUT-encoded.test @@ -0,0 +1,14 @@ +# +# Testing with a process similar to iCal4 +# +TYPE=PUT +URL=http://regression.host/caldav.php/user1/home/0545-deflate-PUT.ics +HEAD + +HEADER=DAVKit/4.0 (729); CalendarStore/4.0 (965); iCal/4.0 (1362); Mac OS X/10.6.1 (10B504) +HEADER=Content-Type: text/calendar +HEADER=Content-Encoding: deflate + +# +# +DATA=0545-deflate-PUT diff --git a/testing/tests/regression-suite/0553-iPhone-PROPFIND.result b/testing/tests/regression-suite/0553-iPhone-PROPFIND.result index bab42055..a5f4e551 100644 --- a/testing/tests/regression-suite/0553-iPhone-PROPFIND.result +++ b/testing/tests/regression-suite/0553-iPhone-PROPFIND.result @@ -2,7 +2,7 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "2bac61d8cc65cae86757a7dd00eef4e2" +ETag: "4f2f5fe4966246175dfc7a90396422d2" Content-Length: 12754 Content-Type: text/xml; charset="utf-8" @@ -70,7 +70,7 @@ Content-Type: text/xml; charset="utf-8" user1 home - "a707eb83606863b8f1f30274b6b1a5b8" + "243d78db0cc75a576d2603eef69efdc9" #0252D4FF diff --git a/testing/tests/regression-suite/0554-iPhone-PROPFIND.result b/testing/tests/regression-suite/0554-iPhone-PROPFIND.result index bab42055..a5f4e551 100644 --- a/testing/tests/regression-suite/0554-iPhone-PROPFIND.result +++ b/testing/tests/regression-suite/0554-iPhone-PROPFIND.result @@ -2,7 +2,7 @@ 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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "2bac61d8cc65cae86757a7dd00eef4e2" +ETag: "4f2f5fe4966246175dfc7a90396422d2" Content-Length: 12754 Content-Type: text/xml; charset="utf-8" @@ -70,7 +70,7 @@ Content-Type: text/xml; charset="utf-8" user1 home - "a707eb83606863b8f1f30274b6b1a5b8" + "243d78db0cc75a576d2603eef69efdc9" #0252D4FF diff --git a/testing/tests/regression-suite/0555-iPhone-REPORT.result b/testing/tests/regression-suite/0555-iPhone-REPORT.result index 4719202e..0dad8ef7 100644 --- a/testing/tests/regression-suite/0555-iPhone-REPORT.result +++ b/testing/tests/regression-suite/0555-iPhone-REPORT.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "9c90079c6ad9a199bbf4a3b36eb92246" -Content-Length: 1123 +ETag: "64bfdf4e95a5799a86f1c79e0f3faf1d" +Content-Length: 1369 Content-Type: text/xml; charset="utf-8" @@ -48,4 +48,14 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 200 OK + + /caldav.php/user1/home/0545-deflate-PUT.ics + + + "4a3aa58a3e11487e87d87024465d4182" + + + HTTP/1.1 200 OK + + diff --git a/testing/tests/regression-suite/0559-iOS-REPORT.result b/testing/tests/regression-suite/0559-iOS-REPORT.result index b102c654..ee3597d2 100644 --- a/testing/tests/regression-suite/0559-iOS-REPORT.result +++ b/testing/tests/regression-suite/0559-iOS-REPORT.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "8b72e0eb2a2a3afd42cf96e4df5e9974" -Content-Length: 950 +ETag: "09eb139019832f5f89469c914c977636" +Content-Length: 1227 Content-Type: text/xml; charset="utf-8" @@ -38,6 +38,16 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 200 OK + + /caldav.php/user1/home/0545-deflate-PUT.ics + + + "4a3aa58a3e11487e87d87024465d4182" + text/calendar + + HTTP/1.1 200 OK + + dav_name: >/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics< @@ -60,3 +70,7 @@ Content-Type: text/xml; charset="utf-8" dtstart: >2011-10-05 14:00:00+13< rrule: >NULL< + dav_name: >/user1/home/0545-deflate-PUT.ics< + dtstart: >2011-10-07 10:00:00+13< + rrule: >NULL< + diff --git a/testing/tests/regression-suite/0598-REPORT-sync-initial.result b/testing/tests/regression-suite/0598-REPORT-sync-initial.result index 97c429a0..b34472f4 100644 --- a/testing/tests/regression-suite/0598-REPORT-sync-initial.result +++ b/testing/tests/regression-suite/0598-REPORT-sync-initial.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "f3c2aff3ffaca5f51dea5f2aa5eb194a" -Content-Length: 4253 +ETag: "f855e21bdab0b98d0bfefa0211bde9ac" +Content-Length: 4479 Content-Type: text/xml; charset="utf-8" @@ -161,5 +161,14 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 200 OK + + /caldav.php/user1/home/0545-deflate-PUT.ics + + + "4a3aa58a3e11487e87d87024465d4182" + + HTTP/1.1 200 OK + + data:,2 diff --git a/testing/tests/regression-suite/0599-REPORT-sync-changed.result b/testing/tests/regression-suite/0599-REPORT-sync-changed.result index e2f739cf..745e0b76 100644 --- a/testing/tests/regression-suite/0599-REPORT-sync-changed.result +++ b/testing/tests/regression-suite/0599-REPORT-sync-changed.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "5b017196880ac06e0b2b5579ba6e5153" -Content-Length: 4009 +ETag: "99574d7bc8d5f12a1a5ac80934cee9f2" +Content-Length: 4235 Content-Type: text/xml; charset="utf-8" @@ -17,6 +17,15 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 200 OK + + /caldav.php/user1/home/0545-deflate-PUT.ics + + + "4a3aa58a3e11487e87d87024465d4182" + + HTTP/1.1 200 OK + + /caldav.php/user1/home/0575d895-a006-4ed8-9be6-0d1b6b6b1f96.ics diff --git a/testing/tests/regression-suite/0602-Soho-PROPFIND.result b/testing/tests/regression-suite/0602-Soho-PROPFIND.result index 08e51f1f..67cddacc 100644 --- a/testing/tests/regression-suite/0602-Soho-PROPFIND.result +++ b/testing/tests/regression-suite/0602-Soho-PROPFIND.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "98b7c2157174c7fe61cb19bd4807456c" -Content-Length: 17006 +ETag: "b809f86b465fa4356c00d884de114029" +Content-Length: 17557 Content-Type: text/xml; charset="utf-8" @@ -426,6 +426,28 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 404 Not Found + + /caldav.php/user1/home/0545-deflate-PUT.ics + + + + /caldav.php/user1/ + + + mailto:user1@example.net + /caldav.php/user1/ + + + HTTP/1.1 200 OK + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/addresses/ diff --git a/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result b/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result index 2e450940..75174e7e 100644 --- a/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result +++ b/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result @@ -633,6 +633,41 @@ HTTP/1.1 404 Not Found + + /caldav.php/user1/home/0545-deflate-PUT.ics + + + 20111004T023507Z + In Prague, 10am, Oct 7th for 1 hour + + 710 + text/calendar + "4a3aa58a3e11487e87d87024465d4182" + Dow, 01 Jan 2000 00:00:00 GMT + + + + + + + + + + + + + HTTP/1.1 200 OK + + + + + + + + + HTTP/1.1 404 Not Found + + /caldav.php/user1/home/DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics diff --git a/testing/tests/regression-suite/0901-GET-Collection.result b/testing/tests/regression-suite/0901-GET-Collection.result index 24ce380b..a4eef2bb 100644 --- a/testing/tests/regression-suite/0901-GET-Collection.result +++ b/testing/tests/regression-suite/0901-GET-Collection.result @@ -2,7 +2,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -Content-Length: 10461 +Content-Length: 11093 Etag: "855cbfab1940e342d7986c207bf3f973" Content-Type: text/calendar; charset="utf-8" @@ -234,6 +234,16 @@ DTSTAMP:20111004T153507Z SEQUENCE:1 END:VEVENT BEGIN:VEVENT +CREATED:20111004T153507Z +UID:0545-deflate-PUT +TRANSP:OPAQUE +SUMMARY:In Prague, 10am, Oct 7th for 1 hour +DTSTART;TZID=Prague_in_Central_Europe:20111007T100000 +DURATION:PT1H +DTSTAMP:20111004T153507Z +SEQUENCE:1 +END:VEVENT +BEGIN:VEVENT DESCRIPTION:Have a party. All the best parties are monthly! UID:DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74 DTSTAMP:20081024T220925Z @@ -377,4 +387,22 @@ TZNAME:GMT+01:00 TZOFFSETTO:+0100 END:STANDARD END:VTIMEZONE +BEGIN:VTIMEZONE +TZID:Prague_in_Central_Europe +X-MICROSOFT-CDO-TZID:4 +BEGIN:DAYLIGHT +TZOFFSETFROM:+0100 +RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU +DTSTART:19810329T020000 +TZNAME:GMT+02:00 +TZOFFSETTO:+0200 +END:DAYLIGHT +BEGIN:STANDARD +TZOFFSETFROM:+0200 +RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU +DTSTART:19961027T030000 +TZNAME:GMT+01:00 +TZOFFSETTO:+0100 +END:STANDARD +END:VTIMEZONE END:VCALENDAR diff --git a/testing/tests/regression-suite/0902-PUT-collection.result b/testing/tests/regression-suite/0902-PUT-collection.result index bed510bd..09401b69 100644 --- a/testing/tests/regression-suite/0902-PUT-collection.result +++ b/testing/tests/regression-suite/0902-PUT-collection.result @@ -16,7 +16,7 @@ Content-Type: text/plain; charset="utf-8" attendees: >40< - collection_id: >1565< + collection_id: >1566< dav_displayname: >anotherone< dav_etag: >f9a8ee6b41d9b02aa5176e6da349121a< dav_name: >/user1/anotherone/< diff --git a/testing/tests/regression-suite/0924-MOVE.result b/testing/tests/regression-suite/0924-MOVE.result index 1cc2302d..2b977264 100644 --- a/testing/tests/regression-suite/0924-MOVE.result +++ b/testing/tests/regression-suite/0924-MOVE.result @@ -6,9 +6,9 @@ Content-Length: 0 Content-Type: text/plain; charset="utf-8" - cd_collection: >1565< + cd_collection: >1566< cd_user_no: >10< - ci_collection: >1565< + ci_collection: >1566< ci_user_no: >10< data_name: >/user1/anotherone/DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics< item_name: >/user1/anotherone/DAYPARTY-77C6-4FB7-BDD3-6882E2F1BE74.ics< diff --git a/testing/tests/regression-suite/1100-REPORT-sync-changed.result b/testing/tests/regression-suite/1100-REPORT-sync-changed.result index 5cadb34e..e30ccc99 100644 --- a/testing/tests/regression-suite/1100-REPORT-sync-changed.result +++ b/testing/tests/regression-suite/1100-REPORT-sync-changed.result @@ -2,8 +2,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 DAV: extended-mkcol, calendar-proxy, bind, addressbook, calendar-auto-schedule -ETag: "9e36538f6420769c24958617f475b7a8" -Content-Length: 6171 +ETag: "6d416d900e71bc416b72a7f97e779ed3" +Content-Length: 6466 Content-Type: text/xml; charset="utf-8" @@ -18,6 +18,16 @@ Content-Type: text/xml; charset="utf-8" HTTP/1.1 200 OK + + /caldav.php/user1/home/0545-deflate-PUT.ics + + + "4a3aa58a3e11487e87d87024465d4182" + Dow, 01 Jan 2000 00:00:00 GMT + + HTTP/1.1 200 OK + + /caldav.php/user1/home/0575d895-a006-4ed8-9be6-0d1b6b6b1f96.ics diff --git a/testing/tests/scheduling/Restore-Database.result b/testing/tests/scheduling/Restore-Database.result index f64f5bae..90d7af1f 100644 --- a/testing/tests/scheduling/Restore-Database.result +++ b/testing/tests/scheduling/Restore-Database.result @@ -1,6 +1,6 @@ setval -------- - 1641 + 1642 (1 row) setval @@ -30,7 +30,7 @@ setval -------- - 12 + 13 (1 row) setval diff --git a/testing/tests/timezone/5010-list.result b/testing/tests/timezone/5010-list.result index c05b53ba..a2df3fe0 100644 --- a/testing/tests/timezone/5010-list.result +++ b/testing/tests/timezone/5010-list.result @@ -1,6 +1,6 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT -Content-Length: 2857 +Content-Length: 3064 Content-Type: application/xml; charset="utf-8" @@ -64,6 +64,13 @@ Content-Type: application/xml; charset="utf-8" Pacific/Auckland + + Prague_in_Central_Europe + all good + + + Prague_in_Central_Europe + /softwarestudio.org/Olson_20011030_5/Pacific/Auckland all good diff --git a/testing/tests/timezone/Restore-Database.result b/testing/tests/timezone/Restore-Database.result index 61b9de76..63cfba9b 100644 --- a/testing/tests/timezone/Restore-Database.result +++ b/testing/tests/timezone/Restore-Database.result @@ -1,6 +1,6 @@ setval -------- - 1651 + 1652 (1 row) setval @@ -30,7 +30,7 @@ setval -------- - 12 + 13 (1 row) setval