From 0f41ade035e9da3b42ddc0334dd60d8a54e11084 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 22:17:19 +0100 Subject: [PATCH 01/16] Bugs pointed out by PHPStorm. --- inc/caldav-DELETE.php | 2 ++ inc/caldav-PUT-functions.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/caldav-DELETE.php b/inc/caldav-DELETE.php index a0997434..41e895cc 100644 --- a/inc/caldav-DELETE.php +++ b/inc/caldav-DELETE.php @@ -20,6 +20,8 @@ $lock_opener = $request->FailIfLocked(); require_once('schedule-functions.php'); function delete_collection( $id ) { + global $session, $request; + $params = array( ':collection_id' => $id ); $qry = new AwlQuery('SELECT child.collection_id AS child_id FROM collection child JOIN collection parent ON (parent.dav_name = child.parent_container) WHERE parent.collection_id = :collection_id', $params ); if ( $qry->Exec('DELETE',__LINE__,__FILE__) && $qry->rows() > 0 ) { diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index 6ba05909..62006c88 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -373,7 +373,7 @@ function do_scheduling_reply( vCalendar $resource, vProperty $organizer ) { $response = '3.7'; // Organizer was not found on server. if ( !$organizer_calendar->Exists() ) { dbg_error_log('ERROR','Default calendar at "%s" does not exist for user "%s"', - $organizer_calendar->dav_name(), $schedule_target->username()); + $organizer_calendar->dav_name(), $organizer_principal->username()); $response = '5.2'; // No scheduling support for user } else { @@ -384,7 +384,7 @@ function do_scheduling_reply( vCalendar $resource, vProperty $organizer ) { $response = '1.2'; // Scheduling reply delivered successfully if ( $organizer_calendar->WriteCalendarMember($schedule_original, false, false, $segment_name) === false ) { dbg_error_log('ERROR','Could not write updated calendar member to %s', - $attendee_calendar->dav_name(), $attendee_calendar->dav_name(), $schedule_target->username()); + $organizer_calendar->dav_name()); trace_bug('Failed to write scheduling resource.'); } } @@ -1249,7 +1249,7 @@ function write_resource( DAVResource $resource, $caldav_data, DAVResource $colle } if ( $qry->rows() != 1 || !($row = $qry->Fetch()) ) { // No dav_id? => We're toast! - trace_bug( 'No dav_id for "%s" on %s!!!', $path, ($create_resource ? 'create': 'update')); + trace_bug( 'No dav_id for "%s" on %s!!!', $path, ($put_action_type == 'INSERT' ? 'create': 'update')); rollback_on_error( $caldav_context, $user_no, $path); return false; } From eb804965117181e7e47eab31c5e167736ead7657 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 22:36:06 +0100 Subject: [PATCH 02/16] Provide some more useful error details in various PUT failure situations. --- inc/caldav-PUT-functions.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index 62006c88..5a2064c3 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -98,7 +98,7 @@ function controlRequestContainer( $username, $user_no, $path, $caldav_context, $ $sql = 'SELECT * FROM collection WHERE dav_name = :dav_name'; $qry = new AwlQuery( $sql, array( ':dav_name' => $request_container) ); if ( ! $qry->Exec('PUT',__LINE__,__FILE__) ) { - rollback_on_error( $caldav_context, $user_no, $path ); + rollback_on_error( $caldav_context, $user_no, $path, 'Database error in: '.$sql ); } if ( !isset($c->readonly_webdav_collections) || $c->readonly_webdav_collections == true ) { if ( $qry->rows() == 0 ) { @@ -132,7 +132,7 @@ VALUES( :user_no, :parent_container, :dav_name, :dav_etag, :dav_displayname, TRU $sql = 'UPDATE collection SET publicly_readable = :is_public::boolean WHERE collection_id = :collection_id'; $params = array( ':is_public' => ($public?'t':'f'), ':collection_id' => $collection->collection_id ); if ( ! $qry->QDo($sql,$params) ) { - rollback_on_error( $caldav_context, $user_no, $path ); + rollback_on_error( $caldav_context, $user_no, $path, 'Database error in: '.$sql ); } } } @@ -694,10 +694,10 @@ function import_addressbook_collection( $vcard_content, $user_no, $path, $caldav $sql = 'SELECT * FROM collection WHERE dav_name = :dav_name'; $qry = new AwlQuery( $sql, array( ':dav_name' => $path) ); - if ( ! $qry->Exec('PUT',__LINE__,__FILE__) ) rollback_on_error( $caldav_context, $user_no, $path ); + if ( ! $qry->Exec('PUT',__LINE__,__FILE__) ) rollback_on_error( $caldav_context, $user_no, $path, 'Database error in: '.$sql ); if ( ! $qry->rows() == 1 ) { dbg_error_log( 'ERROR', ' PUT: Collection does not exist at "%s" for user %d', $path, $user_no ); - rollback_on_error( $caldav_context, $user_no, $path ); + rollback_on_error( $caldav_context, $user_no, $path, sprintf('Error: Collection does not exist at "%s" for user %d', $path, $user_no )); } $collection = $qry->Fetch(); @@ -709,7 +709,7 @@ function import_addressbook_collection( $vcard_content, $user_no, $path, $caldav ); if ( !$appending ) { if ( !$qry->QDo('DELETE FROM caldav_data WHERE collection_id = :collection_id', $base_params) ) - rollback_on_error( $caldav_context, $user_no, $collection->collection_id ); + rollback_on_error( $caldav_context, $user_no, $collection->collection_id, 'Database error on DELETE of existing rows' ); } $dav_data_insert = <<skip_bad_event_on_import) && $c->skip_bad_event_on_import ) $qry->Begin(); - if ( !$qry->QDo($dav_data_insert,$dav_data_params) ) rollback_on_error( $caldav_context, $user_no, $path ); + if ( !$qry->QDo($dav_data_insert,$dav_data_params) ) rollback_on_error( $caldav_context, $user_no, $path, 'Database error on: '.$dav_data_insert ); $qry->QDo('SELECT dav_id FROM caldav_data WHERE dav_name = :dav_name ', array(':dav_name' => $dav_data_params[':dav_name'])); if ( $qry->rows() == 1 && $row = $qry->Fetch() ) { @@ -768,7 +768,7 @@ EOSQL; } if ( !(isset($c->skip_bad_event_on_import) && $c->skip_bad_event_on_import) ) { - if ( ! $qry->Commit() ) rollback_on_error( $caldav_context, $user_no, $path); + if ( ! $qry->Commit() ) rollback_on_error( $caldav_context, $user_no, $path, 'Database error on COMMIT'); } } @@ -808,7 +808,7 @@ function import_calendar_collection( $ics_content, $user_no, $path, $caldav_cont if ( !$appending && isset($displayname) ) { $sql = 'UPDATE collection SET dav_displayname = :displayname WHERE dav_name = :dav_name'; $qry = new AwlQuery( $sql, array( ':displayname' => $displayname, ':dav_name' => $path) ); - if ( ! $qry->Exec('PUT',__LINE__,__FILE__) ) rollback_on_error( $caldav_context, $user_no, $path ); + if ( ! $qry->Exec('PUT',__LINE__,__FILE__) ) rollback_on_error( $caldav_context, $user_no, $path, 'Database error on: '.$sql ); } @@ -839,10 +839,10 @@ function import_calendar_collection( $ics_content, $user_no, $path, $caldav_cont $sql = 'SELECT * FROM collection WHERE dav_name = :dav_name'; $qry = new AwlQuery( $sql, array( ':dav_name' => $path) ); - if ( ! $qry->Exec('PUT',__LINE__,__FILE__) ) rollback_on_error( $caldav_context, $user_no, $path ); + if ( ! $qry->Exec('PUT',__LINE__,__FILE__) ) rollback_on_error( $caldav_context, $user_no, $path, 'Database error on: '.$sql ); if ( ! $qry->rows() == 1 ) { dbg_error_log( 'ERROR', ' PUT: Collection does not exist at "%s" for user %d', $path, $user_no ); - rollback_on_error( $caldav_context, $user_no, $path ); + rollback_on_error( $caldav_context, $user_no, $path, sprintf( 'Error: Collection does not exist at "%s" for user %d', $path, $user_no )); } $collection = $qry->Fetch(); $collection_id = $collection->collection_id; @@ -944,7 +944,7 @@ EOSQL; // Write to the caldav_data table if ( !$qry->QDo( ($inserting ? $dav_data_insert : $dav_data_update), $dav_data_params) ) - rollback_on_error( $caldav_context, $user_no, $path ); + rollback_on_error( $caldav_context, $user_no, $path, 'Database error on:'. ($inserting ? $dav_data_insert : $dav_data_update)); // Get the dav_id for this row $qry->QDo('SELECT dav_id FROM caldav_data WHERE dav_name = :dav_name ', array(':dav_name' => $dav_data_params[':dav_name'])); From 2a202c77a298bcfe0c034e8e8e6d725232b81b58 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 22:41:05 +0100 Subject: [PATCH 03/16] Ensuring we delete vigorously from the cache for DELETE is ++important! --- inc/caldav-DELETE.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inc/caldav-DELETE.php b/inc/caldav-DELETE.php index 41e895cc..f577c5ff 100644 --- a/inc/caldav-DELETE.php +++ b/inc/caldav-DELETE.php @@ -45,6 +45,7 @@ function delete_collection( $id ) { if ( !$dav_resource->Exists() )$request->DoResponse( 404 ); if ( ! ( $dav_resource->resource_id() > 0 ) ) { + @dbg_error_log( "DELETE", ": failed: User: %d, ETag: %s, Path: %s, ResourceID: %d", $session->user_no, $request->etag_if_match, $request->path, $dav_resource->resource_id()); $request->DoResponse( 403 ); } @@ -52,11 +53,16 @@ $qry = new AwlQuery(); $qry->Begin(); if ( $dav_resource->IsCollection() ) { + $cache = getCacheInstance(); + $myLock = $cache->acquireLock('collection-'.$dav_resource->parent_path()); if ( $dav_resource->IsBinding() ) { $params = array( ':dav_name' => $dav_resource->dav_name() ); if ( $qry->QDo("DELETE FROM dav_binding WHERE dav_name = :dav_name", $params ) && $qry->Commit() ) { + $cache->delete( 'collection-'.$dav_resource->dav_name(), null ); + $cache->delete( 'collection-'.$dav_resource->parent_path(), null ); + $cache->releaseLock($myLock); @dbg_error_log( "DELETE", "DELETE: Binding: %d, ETag: %s, Path: %s", $session->user_no, $request->etag_if_match, $request->path); $request->DoResponse( 204 ); } @@ -64,11 +70,13 @@ if ( $dav_resource->IsCollection() ) { else { if ( delete_collection( $dav_resource->resource_id() ) && $qry->Commit() ) { // Uncache anything to do with the collection - $cache = getCacheInstance(); $cache->delete( 'collection-'.$dav_resource->dav_name(), null ); + $cache->delete( 'collection-'.$dav_resource->parent_path(), null ); + $cache->releaseLock($myLock); $request->DoResponse( 204 ); } } + $cache->releaseLock($myLock); } else { if ( isset($request->etag_if_match) && $request->etag_if_match != $dav_resource->unique_tag() && $request->etag_if_match != "*" ) { From 50d0de4992378d9e769f7b71b45a334e2ad4c229 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:01:46 +0100 Subject: [PATCH 04/16] Disabling slow query threshold nag for batch job. --- scripts/refresh-alarms.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/refresh-alarms.php b/scripts/refresh-alarms.php index 68cb4663..5641fe9c 100755 --- a/scripts/refresh-alarms.php +++ b/scripts/refresh-alarms.php @@ -24,6 +24,7 @@ $_SERVER['SERVER_NAME'] = 'localhost'; $args = (object) array(); $args->debug = false; $args->set_last = false; +$args->slow_query_threshold = false; // Won't set higher threshold by default $args->future = 'P400D'; $args->near_past = 'P1D'; @@ -33,11 +34,12 @@ $debugging = null; function parse_arguments() { global $args; - $opts = getopt( 'f:p:s:d:lh' ); + $opts = getopt( 'f:p:q:s:d:lh' ); foreach( $opts AS $k => $v ) { switch( $k ) { case 'f': $args->future = $v; break; case 'p': $args->near_past = $v; break; + case 'q': $args->slow_query_threshold = $v; break; case 's': $_SERVER['SERVER_NAME'] = $v; break; case 'd': $args->debug = true; $debugging = explode(',',$v); break; case 'l': $args->set_last = true; break; @@ -59,6 +61,7 @@ Usage: -l Try to set the 'last' alarm date in historical alarms + -q Warn about slow queries which take longer than this many seconds (use AWL default). -d xxx Enable debugging where 'xxx' is a comma-separated list of debug subsystems USAGE; @@ -75,6 +78,9 @@ if ( $args->debug && is_array($debugging )) { $args->near_past = '-' . $args->near_past; require_once("./always.php"); +if ( $args->slow_query_threshold !== false ) { + $c->default_query_warning_threshold = $args->slow_query_threshold; +} require_once('AwlQuery.php'); require_once('RRule-v2.php'); require_once('vCalendar.php'); From b7cc11a3297e621fd251785b2e7bae8ca6d611d9 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:04:52 +0100 Subject: [PATCH 05/16] The str_ireplace() function is not always present. --- inc/caldav-REPORT-sync-collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/caldav-REPORT-sync-collection.php b/inc/caldav-REPORT-sync-collection.php index 1a04087f..6301926e 100644 --- a/inc/caldav-REPORT-sync-collection.php +++ b/inc/caldav-REPORT-sync-collection.php @@ -33,7 +33,7 @@ if ( $sync_level == DEPTH_INFINITY ) { $sync_tokens = $xmltree->GetPath('/DAV::sync-collection/DAV::sync-token'); if ( isset($sync_tokens[0]) ) $sync_token = $sync_tokens[0]->GetContent(); if ( !isset($sync_token) ) $sync_token = 0; -$sync_token = intval(str_ireplace('data:,', '', $sync_token )); +$sync_token = intval(str_replace('data:,', '', strtolower($sync_token) )); dbg_error_log( 'sync', " sync-token: %s", $sync_token ); $proplist = array(); From 8bb5e72c7be017fa0367d191c6f26988a14eff13 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:08:56 +0100 Subject: [PATCH 06/16] Updated regression test results from updates to contenttype --- .../0013-Mulberry-PROPFIND-5.result | 8 ++-- .../0015-Mulberry-PROPFIND-6.result | 8 ++-- .../regression-suite/0103-Evo-GET-1.result | 2 +- .../regression-suite/0106-Evo-GET-1.result | 2 +- .../regression-suite/0247-Moz-PROPFIND.result | 28 ++++++------- .../0822-Spec-PROPFIND-3.result | 40 +++++++++---------- .../0823-Spec-PROPFIND-4.result | 2 +- .../0825-Spec-PROPFIND-6.result | 2 +- .../0830-Spec-FREEBUSY-1.result | 2 +- .../regression-suite/0831-Spec-RRULE-1.result | 2 +- .../regression-suite/0832-freebusy.result | 2 +- .../regression-suite/0833-freebusy.result | 2 +- .../0834-Spec-FREEBUSY-1.result | 2 +- .../regression-suite/0835-freebusy.result | 2 +- .../regression-suite/0836-freebusy.result | 2 +- .../regression-suite/0837-freebusy.result | 2 +- .../regression-suite/0885-GET-freebusy.result | 2 +- .../0886-REPORT-freebusy.result | 2 +- .../regression-suite/0888-GET-freebusy.result | 2 +- .../0941-GET-resource-denied.result | 2 +- .../tests/regression-suite/0960-GET.result | 2 +- .../tests/regression-suite/0965-GET.result | 2 +- .../2100-REPORT-calquery-no-prop.result | 14 +++---- 23 files changed, 67 insertions(+), 67 deletions(-) diff --git a/testing/tests/regression-suite/0013-Mulberry-PROPFIND-5.result b/testing/tests/regression-suite/0013-Mulberry-PROPFIND-5.result index a2214336..0d050dd1 100644 --- a/testing/tests/regression-suite/0013-Mulberry-PROPFIND-5.result +++ b/testing/tests/regression-suite/0013-Mulberry-PROPFIND-5.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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "0e8180a5a3677b7b3e2156a8053882fe" -Content-Length: 1124 +ETag: "303850daab72c97380c725e4d1b90be7" +Content-Length: 1160 Content-Type: text/xml; charset="utf-8" @@ -32,7 +32,7 @@ Content-Type: text/xml; charset="utf-8" 731 - text/calendar + text/calendar; component=vevent HTTP/1.1 200 OK @@ -43,7 +43,7 @@ Content-Type: text/xml; charset="utf-8" 705 - text/calendar + text/calendar; component=vevent HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0015-Mulberry-PROPFIND-6.result b/testing/tests/regression-suite/0015-Mulberry-PROPFIND-6.result index 9b7ab924..7f4ee651 100644 --- a/testing/tests/regression-suite/0015-Mulberry-PROPFIND-6.result +++ b/testing/tests/regression-suite/0015-Mulberry-PROPFIND-6.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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "5fec6bf01e8802ec9facdb7adc7ab93f" -Content-Length: 1124 +ETag: "88e33ac34090404791bb5d0d5208993f" +Content-Length: 1160 Content-Type: text/xml; charset="utf-8" @@ -32,7 +32,7 @@ Content-Type: text/xml; charset="utf-8" 731 - text/calendar + text/calendar; component=vevent HTTP/1.1 200 OK @@ -43,7 +43,7 @@ Content-Type: text/xml; charset="utf-8" 747 - text/calendar + text/calendar; component=vevent HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/0103-Evo-GET-1.result b/testing/tests/regression-suite/0103-Evo-GET-1.result index 0d4c5d56..55918ef1 100644 --- a/testing/tests/regression-suite/0103-Evo-GET-1.result +++ b/testing/tests/regression-suite/0103-Evo-GET-1.result @@ -4,7 +4,7 @@ DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy Etag: "2c32a2f8aba853654eb17fe037a4db4d" Content-Length: 780 -Content-Type: text/calendar; charset="utf-8" +Content-Type: text/calendar; component=vevent; charset="utf-8" BEGIN:VCALENDAR CALSCALE:GREGORIAN diff --git a/testing/tests/regression-suite/0106-Evo-GET-1.result b/testing/tests/regression-suite/0106-Evo-GET-1.result index 736ed9c1..4e180fc8 100644 --- a/testing/tests/regression-suite/0106-Evo-GET-1.result +++ b/testing/tests/regression-suite/0106-Evo-GET-1.result @@ -4,7 +4,7 @@ DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy Etag: "fdcc61a1e0d76b177ad81cf7c8bdacaf" Content-Length: 1106 -Content-Type: text/calendar; charset="utf-8" +Content-Type: text/calendar; component=vevent; charset="utf-8" BEGIN:VCALENDAR CALSCALE:GREGORIAN diff --git a/testing/tests/regression-suite/0247-Moz-PROPFIND.result b/testing/tests/regression-suite/0247-Moz-PROPFIND.result index a5fd0174..0d378e84 100644 --- a/testing/tests/regression-suite/0247-Moz-PROPFIND.result +++ b/testing/tests/regression-suite/0247-Moz-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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "8ea04cfcf16d0c3ec23b67c6a479cce4" -Content-Length: 4293 +ETag: "b9794562e6fd1d230515a6d4a8c211a4" +Content-Length: 4504 Content-Type: text/xml; charset="utf-8" @@ -31,7 +31,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics - text/calendar + text/calendar; component=vevent "2c32a2f8aba853654eb17fe037a4db4d" @@ -42,7 +42,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/20061101T073004Z.ics - text/calendar + text/calendar; component=vevent "fdcc61a1e0d76b177ad81cf7c8bdacaf" @@ -53,7 +53,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics - text/calendar + text/calendar; component=vevent "a1c6404d61190f9574e2bfd69383f144" @@ -64,7 +64,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/9d050be7-8a02-4355-8ed3-02a9fc5f473f.ics - text/calendar + text/calendar; component=vevent "08a435c2abaf38f4a50a997343c098a7" @@ -75,7 +75,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/1906b3ca-4890-468a-9b58-1de74bf2c716.ics - text/calendar + text/calendar; component=vevent "5def8ae2b20893a1c7f4dbaeb008f2f1" @@ -86,7 +86,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/fbd57454-d966-4a14-8341-abe1edb1ae66.ics - text/calendar + text/calendar; component=vevent "ac90acd649c25070b1a2a17fb31a105a" @@ -97,7 +97,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/2178279a-aec2-471f-832d-1f6df6203f2f.ics - text/calendar + text/calendar; component=vtodo "509b0f0d8a3363379f9f5727f5dd74a0" @@ -108,7 +108,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/917b9e47-b748-4550-a566-657fbe672447.ics - text/calendar + text/calendar; component=vtodo "cb3d9dc3e8c157f53eba3ea0e1e0f146" @@ -119,7 +119,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/0575d895-a006-4ed8-9be6-0d1b6b6b1f96.ics - text/calendar + text/calendar; component=vtodo "00ad5eb1eb5507884710b0b66aa5d5c4" @@ -130,7 +130,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/b1679f77-673d-4f46-b3eb-2420e1bba301.ics - text/calendar + text/calendar; component=vtodo "a2990674708634a311bb98a59865ca50" @@ -141,7 +141,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/e70576e9-c1e0-431e-a507-0386fd82f223.ics - text/calendar + text/calendar; component=vevent "e8060931f30c1798ac58ffbe4ec0bffc" @@ -152,7 +152,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/e6eb5bc9-f7f9-4a0a-94e8-8e90eefc7d08.ics - text/calendar + text/calendar; component=vtodo "8f581a053df6d833254756dfd7553d37" diff --git a/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result b/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result index 75174e7e..fb5ab514 100644 --- a/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result +++ b/testing/tests/regression-suite/0822-Spec-PROPFIND-3.result @@ -46,7 +46,7 @@ Lunch with David 747 - text/calendar + text/calendar; component=vevent "2c32a2f8aba853654eb17fe037a4db4d" Dow, 01 Jan 2000 00:00:00 GMT @@ -81,7 +81,7 @@ A Changed Meeting 829 - text/calendar + text/calendar; component=vevent "bcc402382688cb3e8e57379c757dbcb0" Dow, 01 Jan 2000 00:00:00 GMT @@ -116,7 +116,7 @@ Weekly Project Meeting 999 - text/calendar + text/calendar; component=vevent "a1c6404d61190f9574e2bfd69383f144" Dow, 01 Jan 2000 00:00:00 GMT @@ -151,7 +151,7 @@ Confidential Event 956 - text/calendar + text/calendar; component=vevent "08a435c2abaf38f4a50a997343c098a7" Dow, 01 Jan 2000 00:00:00 GMT @@ -186,7 +186,7 @@ Private Event 970 - text/calendar + text/calendar; component=vevent "5def8ae2b20893a1c7f4dbaeb008f2f1" Dow, 01 Jan 2000 00:00:00 GMT @@ -221,7 +221,7 @@ Tentative Event 929 - text/calendar + text/calendar; component=vevent "ac90acd649c25070b1a2a17fb31a105a" Dow, 01 Jan 2000 00:00:00 GMT @@ -256,7 +256,7 @@ Incomplete, uncancelled 415 - text/calendar + text/calendar; component=vtodo "509b0f0d8a3363379f9f5727f5dd74a0" Dow, 01 Jan 2000 00:00:00 GMT @@ -291,7 +291,7 @@ 50% Complete, uncancelled 449 - text/calendar + text/calendar; component=vtodo "cb3d9dc3e8c157f53eba3ea0e1e0f146" Dow, 01 Jan 2000 00:00:00 GMT @@ -326,7 +326,7 @@ Due 7/8/7 16:30, completed 961 - text/calendar + text/calendar; component=vtodo "00ad5eb1eb5507884710b0b66aa5d5c4" Dow, 01 Jan 2000 00:00:00 GMT @@ -361,7 +361,7 @@ A Cancelled Task, with a start and due date 1001 - text/calendar + text/calendar; component=vtodo "a2990674708634a311bb98a59865ca50" Dow, 01 Jan 2000 00:00:00 GMT @@ -396,7 +396,7 @@ Morning Meeting 1119 - text/calendar + text/calendar; component=vevent "e8060931f30c1798ac58ffbe4ec0bffc" Dow, 01 Jan 2000 00:00:00 GMT @@ -431,7 +431,7 @@ Release 0.9.3 1013 - text/calendar + text/calendar; component=vtodo "8f581a053df6d833254756dfd7553d37" Dow, 01 Jan 2000 00:00:00 GMT @@ -466,7 +466,7 @@ Beer O'Clock 769 - text/calendar + text/calendar; component=vevent "55f02f66966ee150320383803d1e0d34" Dow, 01 Jan 2000 00:00:00 GMT @@ -501,7 +501,7 @@ Morning Mgmt Mtg 313 - text/calendar + text/calendar; component=vevent "6f16959eee5c920b45548840b1e9ea19" Dow, 01 Jan 2000 00:00:00 GMT @@ -536,7 +536,7 @@ BBQ @ ML's 981 - text/calendar + text/calendar; component=vevent "efd0257efbc898d059c200d1391af060" Dow, 01 Jan 2000 00:00:00 GMT @@ -571,7 +571,7 @@ New Event 676 - text/calendar + text/calendar; component=vevent "257b9df4aaf573a578af4aadd033abf4" Dow, 01 Jan 2000 00:00:00 GMT @@ -606,7 +606,7 @@ In Central Europe, 2pm, Oct 5th for 1 hour 761 - text/calendar + text/calendar; component=vevent "6ddd18264a9d40c1c9d37a005eeb7e4f" Dow, 01 Jan 2000 00:00:00 GMT @@ -641,7 +641,7 @@ In Prague, 10am, Oct 7th for 1 hour 710 - text/calendar + text/calendar; component=vevent "4a3aa58a3e11487e87d87024465d4182" Dow, 01 Jan 2000 00:00:00 GMT @@ -676,7 +676,7 @@ Party all day! 772 - text/calendar + text/calendar; component=vevent "165746adbab8bc0c8336a63cc5332ff2" Dow, 01 Jan 2000 00:00:00 GMT @@ -711,7 +711,7 @@ Woohoo! Time to Par-tay! 800 - text/calendar + text/calendar; component=vevent "2a09ef8c6a9e0b6bc16228359b99d8e7" Dow, 01 Jan 2000 00:00:00 GMT diff --git a/testing/tests/regression-suite/0823-Spec-PROPFIND-4.result b/testing/tests/regression-suite/0823-Spec-PROPFIND-4.result index b077f6a6..67ae4aea 100644 --- a/testing/tests/regression-suite/0823-Spec-PROPFIND-4.result +++ b/testing/tests/regression-suite/0823-Spec-PROPFIND-4.result @@ -93,7 +93,7 @@ Morning Mgmt Mtg 313 - text/calendar + text/calendar; component=vevent "6f16959eee5c920b45548840b1e9ea19" Dow, 01 Jan 2000 00:00:00 GMT diff --git a/testing/tests/regression-suite/0825-Spec-PROPFIND-6.result b/testing/tests/regression-suite/0825-Spec-PROPFIND-6.result index 98869dee..b1557726 100644 --- a/testing/tests/regression-suite/0825-Spec-PROPFIND-6.result +++ b/testing/tests/regression-suite/0825-Spec-PROPFIND-6.result @@ -4,7 +4,7 @@ /caldav.php/user1/home/da81c0ee-7871-11db-c6d6-f6927c144649.ics - text/calendar + text/calendar; component=vevent 313 Morning Mgmt Mtg diff --git a/testing/tests/regression-suite/0830-Spec-FREEBUSY-1.result b/testing/tests/regression-suite/0830-Spec-FREEBUSY-1.result index 0015e64d..3569461c 100644 --- a/testing/tests/regression-suite/0830-Spec-FREEBUSY-1.result +++ b/testing/tests/regression-suite/0830-Spec-FREEBUSY-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, bind, addressbook, calendar-auto-schedule, calendar-proxy Content-Length: 1256 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0831-Spec-RRULE-1.result b/testing/tests/regression-suite/0831-Spec-RRULE-1.result index 5d5e0609..f80a5744 100644 --- a/testing/tests/regression-suite/0831-Spec-RRULE-1.result +++ b/testing/tests/regression-suite/0831-Spec-RRULE-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, bind, addressbook, calendar-auto-schedule, calendar-proxy Content-Length: 7623 -Content-Type: text/plain +Content-Type: text/plain;charset=UTF-8 #!/usr/bin/php Testing the RRule v2 Library diff --git a/testing/tests/regression-suite/0832-freebusy.result b/testing/tests/regression-suite/0832-freebusy.result index 27cb2f09..883445c5 100644 --- a/testing/tests/regression-suite/0832-freebusy.result +++ b/testing/tests/regression-suite/0832-freebusy.result @@ -1,7 +1,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT Content-Length: 14720 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0833-freebusy.result b/testing/tests/regression-suite/0833-freebusy.result index abe7ebf8..e1579f8c 100644 --- a/testing/tests/regression-suite/0833-freebusy.result +++ b/testing/tests/regression-suite/0833-freebusy.result @@ -1,7 +1,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT Content-Length: 2708 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0834-Spec-FREEBUSY-1.result b/testing/tests/regression-suite/0834-Spec-FREEBUSY-1.result index 588522e6..0b899e2e 100644 --- a/testing/tests/regression-suite/0834-Spec-FREEBUSY-1.result +++ b/testing/tests/regression-suite/0834-Spec-FREEBUSY-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, bind, addressbook, calendar-auto-schedule, calendar-proxy Content-Length: 2708 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0835-freebusy.result b/testing/tests/regression-suite/0835-freebusy.result index 6063b2a8..62859d51 100644 --- a/testing/tests/regression-suite/0835-freebusy.result +++ b/testing/tests/regression-suite/0835-freebusy.result @@ -1,7 +1,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT Content-Length: 222 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0836-freebusy.result b/testing/tests/regression-suite/0836-freebusy.result index 6e3b97d0..c45b48f5 100644 --- a/testing/tests/regression-suite/0836-freebusy.result +++ b/testing/tests/regression-suite/0836-freebusy.result @@ -1,7 +1,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT Content-Length: 14720 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0837-freebusy.result b/testing/tests/regression-suite/0837-freebusy.result index 6e3b97d0..c45b48f5 100644 --- a/testing/tests/regression-suite/0837-freebusy.result +++ b/testing/tests/regression-suite/0837-freebusy.result @@ -1,7 +1,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT Content-Length: 14720 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0885-GET-freebusy.result b/testing/tests/regression-suite/0885-GET-freebusy.result index 8aa79ee5..0d43214f 100644 --- a/testing/tests/regression-suite/0885-GET-freebusy.result +++ b/testing/tests/regression-suite/0885-GET-freebusy.result @@ -1,7 +1,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT Content-Length: 14720 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0886-REPORT-freebusy.result b/testing/tests/regression-suite/0886-REPORT-freebusy.result index 478ff51e..6f36ef27 100644 --- a/testing/tests/regression-suite/0886-REPORT-freebusy.result +++ b/testing/tests/regression-suite/0886-REPORT-freebusy.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, bind, addressbook, calendar-auto-schedule, calendar-proxy Content-Length: 2752 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0888-GET-freebusy.result b/testing/tests/regression-suite/0888-GET-freebusy.result index 8aa79ee5..0d43214f 100644 --- a/testing/tests/regression-suite/0888-GET-freebusy.result +++ b/testing/tests/regression-suite/0888-GET-freebusy.result @@ -1,7 +1,7 @@ HTTP/1.1 200 OK Date: Dow, 01 Jan 2000 00:00:00 GMT Content-Length: 14720 -Content-Type: text/calendar +Content-Type: text/calendar;charset=UTF-8 BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0941-GET-resource-denied.result b/testing/tests/regression-suite/0941-GET-resource-denied.result index 5a0df6e6..062ccd5d 100644 --- a/testing/tests/regression-suite/0941-GET-resource-denied.result +++ b/testing/tests/regression-suite/0941-GET-resource-denied.result @@ -4,7 +4,7 @@ DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy Etag: "bcc402382688cb3e8e57379c757dbcb0" Content-Length: 676 -Content-Type: text/calendar; charset="utf-8" +Content-Type: text/calendar; component=vevent; charset="utf-8" BEGIN:VCALENDAR CALSCALE:GREGORIAN diff --git a/testing/tests/regression-suite/0960-GET.result b/testing/tests/regression-suite/0960-GET.result index 5716c2a8..7a512a2c 100644 --- a/testing/tests/regression-suite/0960-GET.result +++ b/testing/tests/regression-suite/0960-GET.result @@ -3,7 +3,7 @@ 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" +Content-Type: text/calendar; component=vevent; charset="utf-8" BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/0965-GET.result b/testing/tests/regression-suite/0965-GET.result index 5716c2a8..7a512a2c 100644 --- a/testing/tests/regression-suite/0965-GET.result +++ b/testing/tests/regression-suite/0965-GET.result @@ -3,7 +3,7 @@ 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" +Content-Type: text/calendar; component=vevent; charset="utf-8" BEGIN:VCALENDAR PRODID:-//davical.org//NONSGML AWL Calendar//EN diff --git a/testing/tests/regression-suite/2100-REPORT-calquery-no-prop.result b/testing/tests/regression-suite/2100-REPORT-calquery-no-prop.result index f9c4702e..8fd4e4cf 100644 --- a/testing/tests/regression-suite/2100-REPORT-calquery-no-prop.result +++ b/testing/tests/regression-suite/2100-REPORT-calquery-no-prop.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, bind, addressbook, calendar-auto-schedule, calendar-proxy ETag: "looks like an etag" -Content-Length: 5464 +Content-Length: 5572 Content-Type: text/xml; charset="utf-8" @@ -12,7 +12,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics - text/calendar + text/calendar; component=vevent 999 Weekly Project Meeting @@ -44,7 +44,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/9d050be7-8a02-4355-8ed3-02a9fc5f473f.ics - text/calendar + text/calendar; component=vevent 956 Confidential Event @@ -76,7 +76,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/1906b3ca-4890-468a-9b58-1de74bf2c716.ics - text/calendar + text/calendar; component=vevent 970 Private Event @@ -108,7 +108,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/fbd57454-d966-4a14-8341-abe1edb1ae66.ics - text/calendar + text/calendar; component=vevent 929 Tentative Event @@ -140,7 +140,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/71e2ae82-7870-11db-c6d6-f6927c144649.ics - text/calendar + text/calendar; component=vevent 769 Beer O'Clock @@ -172,7 +172,7 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/home/da81c0ee-7871-11db-c6d6-f6927c144649.ics - text/calendar + text/calendar; component=vevent 313 Morning Mgmt Mtg From 208173043a0c80bfdaabaae8a35397466f4b09be Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:10:20 +0100 Subject: [PATCH 07/16] Update to regression test results for PROPPATCH bugfix. --- .../0509-iCal-PROPPATCH.result | 20 +++++++------ .../0533-iCal4-PROPPATCH.result | 20 +++++++------ .../0534-iCal4-PROPPATCH.result | 20 +++++++------ .../0535-iCal4-PROPPATCH.result | 16 ++++++----- .../0606-Soho-PROPPATCH.result | 24 ++++++++-------- .../0841-Spec-PROPPATCH-2.result | 26 +++++++++-------- .../0844-Spec-PROPPATCH-addressbook.result | 22 ++++++++------- .../0844-Spec-PROPPATCH-principal.result | 24 ++++++++-------- .../0845-Spec-PROPPATCH-principal.result | 24 ++++++++-------- .../0846-Spec-PROPPATCH-calendar.result | 28 ++++++++++--------- .../0848-Spec-PROPPATCH-calendar.result | 24 ++++++++-------- 11 files changed, 135 insertions(+), 113 deletions(-) diff --git a/testing/tests/regression-suite/0509-iCal-PROPPATCH.result b/testing/tests/regression-suite/0509-iCal-PROPPATCH.result index 5bcc3a69..19e98c58 100644 --- a/testing/tests/regression-suite/0509-iCal-PROPPATCH.result +++ b/testing/tests/regression-suite/0509-iCal-PROPPATCH.result @@ -2,19 +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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 326 +Content-Length: 359 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - All requested changes were made. - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ + All requested changes were made. + + + + + HTTP/1.1 200 OK + + dav_displayname: >iCal Calendar< diff --git a/testing/tests/regression-suite/0533-iCal4-PROPPATCH.result b/testing/tests/regression-suite/0533-iCal4-PROPPATCH.result index 9d66073a..8c402b70 100644 --- a/testing/tests/regression-suite/0533-iCal4-PROPPATCH.result +++ b/testing/tests/regression-suite/0533-iCal4-PROPPATCH.result @@ -2,17 +2,19 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 335 +Content-Length: 368 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/home/ - All requested changes were made. - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/home/ + All requested changes were made. + + + + + HTTP/1.1 200 OK + + diff --git a/testing/tests/regression-suite/0534-iCal4-PROPPATCH.result b/testing/tests/regression-suite/0534-iCal4-PROPPATCH.result index 0bfeece6..7fc75786 100644 --- a/testing/tests/regression-suite/0534-iCal4-PROPPATCH.result +++ b/testing/tests/regression-suite/0534-iCal4-PROPPATCH.result @@ -2,17 +2,19 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 335 +Content-Length: 368 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/home/ - All requested changes were made. - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/home/ + All requested changes were made. + + + + + HTTP/1.1 200 OK + + diff --git a/testing/tests/regression-suite/0535-iCal4-PROPPATCH.result b/testing/tests/regression-suite/0535-iCal4-PROPPATCH.result index 2b88405e..ae30a24b 100644 --- a/testing/tests/regression-suite/0535-iCal4-PROPPATCH.result +++ b/testing/tests/regression-suite/0535-iCal4-PROPPATCH.result @@ -2,15 +2,17 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 267 +Content-Length: 298 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/home/ - All requested changes were made. - - - HTTP/1.1 200 OK - + + /caldav.php/user1/home/ + All requested changes were made. + + + HTTP/1.1 200 OK + + diff --git a/testing/tests/regression-suite/0606-Soho-PROPPATCH.result b/testing/tests/regression-suite/0606-Soho-PROPPATCH.result index 7d04328e..d43daa70 100644 --- a/testing/tests/regression-suite/0606-Soho-PROPPATCH.result +++ b/testing/tests/regression-suite/0606-Soho-PROPPATCH.result @@ -3,20 +3,22 @@ Date: Dow, 01 Jan 2000 00:00:00 GMT Content-Location: /caldav.php/user1/SOHO%20collection/ DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 424 +Content-Length: 459 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/SOHO%20collection/ - All requested changes were made. - - - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/SOHO%20collection/ + All requested changes were made. + + + + + + + HTTP/1.1 200 OK + + diff --git a/testing/tests/regression-suite/0841-Spec-PROPPATCH-2.result b/testing/tests/regression-suite/0841-Spec-PROPPATCH-2.result index b4eeb1fe..fdaa5eae 100644 --- a/testing/tests/regression-suite/0841-Spec-PROPPATCH-2.result +++ b/testing/tests/regression-suite/0841-Spec-PROPPATCH-2.result @@ -2,22 +2,24 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 448 +Content-Length: 484 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/home/ - All requested changes were made. - - - - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/home/ + All requested changes were made. + + + + + + + + HTTP/1.1 200 OK + + changed_last_5m: >1< diff --git a/testing/tests/regression-suite/0844-Spec-PROPPATCH-addressbook.result b/testing/tests/regression-suite/0844-Spec-PROPPATCH-addressbook.result index b9b17217..24e006c5 100644 --- a/testing/tests/regression-suite/0844-Spec-PROPPATCH-addressbook.result +++ b/testing/tests/regression-suite/0844-Spec-PROPPATCH-addressbook.result @@ -2,20 +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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 313 +Content-Length: 347 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/home/ - All requested changes were made. - - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/home/ + All requested changes were made. + + + + + + HTTP/1.1 200 OK + + changed_last_5m: >1< diff --git a/testing/tests/regression-suite/0844-Spec-PROPPATCH-principal.result b/testing/tests/regression-suite/0844-Spec-PROPPATCH-principal.result index 2c9fb899..62bc567d 100644 --- a/testing/tests/regression-suite/0844-Spec-PROPPATCH-principal.result +++ b/testing/tests/regression-suite/0844-Spec-PROPPATCH-principal.result @@ -2,21 +2,23 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 374 +Content-Length: 409 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/ - All requested changes were made. - - - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/ + All requested changes were made. + + + + + + + HTTP/1.1 200 OK + + displayname: >User Number One PROPPATCH'd in< diff --git a/testing/tests/regression-suite/0845-Spec-PROPPATCH-principal.result b/testing/tests/regression-suite/0845-Spec-PROPPATCH-principal.result index a7f9cf5a..106e9e74 100644 --- a/testing/tests/regression-suite/0845-Spec-PROPPATCH-principal.result +++ b/testing/tests/regression-suite/0845-Spec-PROPPATCH-principal.result @@ -2,21 +2,23 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 374 +Content-Length: 409 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/ - All requested changes were made. - - - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/ + All requested changes were made. + + + + + + + HTTP/1.1 200 OK + + displayname: >User 1< diff --git a/testing/tests/regression-suite/0846-Spec-PROPPATCH-calendar.result b/testing/tests/regression-suite/0846-Spec-PROPPATCH-calendar.result index 07f7e52e..d451ba8e 100644 --- a/testing/tests/regression-suite/0846-Spec-PROPPATCH-calendar.result +++ b/testing/tests/regression-suite/0846-Spec-PROPPATCH-calendar.result @@ -2,23 +2,25 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 462 +Content-Length: 499 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/home/ - All requested changes were made. - - - - - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/home/ + All requested changes were made. + + + + + + + + + HTTP/1.1 200 OK + + changed_last_5m: >1< diff --git a/testing/tests/regression-suite/0848-Spec-PROPPATCH-calendar.result b/testing/tests/regression-suite/0848-Spec-PROPPATCH-calendar.result index 208413b8..b0272a3c 100644 --- a/testing/tests/regression-suite/0848-Spec-PROPPATCH-calendar.result +++ b/testing/tests/regression-suite/0848-Spec-PROPPATCH-calendar.result @@ -2,21 +2,23 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -Content-Length: 386 +Content-Length: 421 Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/home/ - All requested changes were made. - - - - - - - HTTP/1.1 200 OK - + + /caldav.php/user1/home/ + All requested changes were made. + + + + + + + HTTP/1.1 200 OK + + changed_last_5m: >1< From b73ad6ae1949a449e9ff783c88095d0cde187c96 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:11:40 +0100 Subject: [PATCH 08/16] Regression result changes with calendar-free-busy-set disabled. The calendar-free-busy-set functionality is old and superseded. --- .../0520-iCal-PROPFIND.result | 12 +- .../0521-iCal-PROPFIND.result | 8 +- .../0522-iCal-PROPFIND.result | 32 +- .../0532-iCal4-PROPFIND.result | 58 +- .../0547-iCal4-PROPFIND.result | 58 +- .../0548-iCal-PROPFIND.result | 512 ++++++++---------- .../0912-Space-PROPFIND.result | 34 +- 7 files changed, 284 insertions(+), 430 deletions(-) diff --git a/testing/tests/regression-suite/0520-iCal-PROPFIND.result b/testing/tests/regression-suite/0520-iCal-PROPFIND.result index df212015..9fb3dacd 100644 --- a/testing/tests/regression-suite/0520-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0520-iCal-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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "a8d0404f59a91a8a4ef9ab3fd8b356b2" -Content-Length: 1354 +ETag: "1a0c2d97d0118e22caff1e90871e41dd" +Content-Length: 1206 Content-Type: text/xml; charset="utf-8" @@ -18,9 +18,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -29,6 +26,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -39,9 +37,6 @@ Content-Type: text/xml; charset="utf-8" test meeting - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -51,6 +46,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/0521-iCal-PROPFIND.result b/testing/tests/regression-suite/0521-iCal-PROPFIND.result index 507b6987..5e87030a 100644 --- a/testing/tests/regression-suite/0521-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0521-iCal-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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "ccb220eb6558890eb17d5e1da8b45269" -Content-Length: 785 +ETag: "294d286a110b237df5c768aaeb7dda5a" +Content-Length: 711 Content-Type: text/xml; charset="utf-8" @@ -18,9 +18,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -29,6 +26,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/0522-iCal-PROPFIND.result b/testing/tests/regression-suite/0522-iCal-PROPFIND.result index f7da90a3..e41c2510 100644 --- a/testing/tests/regression-suite/0522-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0522-iCal-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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "80d6f30ef4f9a0b77a2eb6c28d935804" -Content-Length: 4594 +ETag: "fb3fbd1d4d0cc1e1926d0291a2be17a8" +Content-Length: 4076 Content-Type: text/xml; charset="utf-8" @@ -18,9 +18,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -29,6 +26,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -43,9 +41,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -54,6 +49,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -68,9 +64,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -79,6 +72,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -93,9 +87,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -104,6 +95,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -118,9 +110,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -129,6 +118,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -143,9 +133,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -154,6 +141,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -168,9 +156,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user2/home/ - HTTP/1.1 200 OK @@ -179,6 +164,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/0532-iCal4-PROPFIND.result b/testing/tests/regression-suite/0532-iCal4-PROPFIND.result index 36b8d7de..1ce1ec23 100644 --- a/testing/tests/regression-suite/0532-iCal4-PROPFIND.result +++ b/testing/tests/regression-suite/0532-iCal4-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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "71bc1e00471cee14ce3dd36752320e6c" -Content-Length: 17305 +ETag: "2f6bc2532047e694057b7ec66bd80b65" +Content-Length: 15568 Content-Type: text/xml; charset="utf-8" @@ -18,11 +18,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -72,6 +67,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -95,11 +91,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -151,6 +142,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -169,11 +161,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -223,6 +210,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -246,11 +234,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -302,6 +285,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -325,11 +309,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -390,6 +369,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -413,11 +393,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -478,6 +453,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -502,11 +478,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -557,6 +528,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -575,11 +547,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -632,6 +599,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -650,11 +618,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -707,6 +670,7 @@ Content-Type: text/xml; charset="utf-8" + diff --git a/testing/tests/regression-suite/0547-iCal4-PROPFIND.result b/testing/tests/regression-suite/0547-iCal4-PROPFIND.result index 9dbf8531..ae892948 100644 --- a/testing/tests/regression-suite/0547-iCal4-PROPFIND.result +++ b/testing/tests/regression-suite/0547-iCal4-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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "3c1ce7546b05f98eabd8cbe7680646d8" -Content-Length: 19736 +ETag: "84f6ab86e65ad459a930d65cf80aad20" +Content-Length: 17999 Content-Type: text/xml; charset="utf-8" @@ -21,11 +21,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -75,6 +70,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -111,11 +107,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -165,6 +156,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -194,11 +186,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -248,6 +235,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -282,11 +270,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -338,6 +321,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -372,11 +356,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -437,6 +416,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -471,11 +451,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -536,6 +511,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -571,11 +547,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -626,6 +597,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -655,11 +627,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -712,6 +679,7 @@ Content-Type: text/xml; charset="utf-8" + @@ -741,11 +709,6 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/user1/ - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - /caldav.php/user1/home/ @@ -798,6 +761,7 @@ Content-Type: text/xml; charset="utf-8" + diff --git a/testing/tests/regression-suite/0548-iCal-PROPFIND.result b/testing/tests/regression-suite/0548-iCal-PROPFIND.result index d076c19d..e8414e50 100644 --- a/testing/tests/regression-suite/0548-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/0548-iCal-PROPFIND.result @@ -4,24 +4,19 @@ 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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "0bb6363a73d84bce63210f8956a67b9c" -Content-Length: 29507 +ETag: "803271349e94513fdc607adc2fc2df6f" +Content-Length: 27776 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ - /caldav.php/user1/?add-member + /caldav.php/user1/?add_member - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - @@ -58,7 +53,7 @@ Content-Type: text/xml; charset="utf-8" User 1 - "89514106d00f37cc9ee71689c450d2ef" + "89514106d00f37cc9ee71689c450d2ef" /caldav.php/user1/ @@ -69,9 +64,9 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/home/ - + @@ -99,30 +94,31 @@ Content-Type: text/xml; charset="utf-8" - + - + + - + - - - - + + + + - - - - - - + + + + + + - - + + HTTP/1.1 404 Not Found @@ -132,14 +128,9 @@ Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/home/?add-member + /caldav.php/user1/home/?add_member #0252D4FF - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - 1 @@ -161,7 +152,7 @@ Content-Type: text/xml; charset="utf-8" - + @@ -180,7 +171,7 @@ Content-Type: text/xml; charset="utf-8" user1 home - "243d78db0cc75a576d2603eef69efdc9" + "243d78db0cc75a576d2603eef69efdc9" /caldav.php/user1/ @@ -189,16 +180,16 @@ Content-Type: text/xml; charset="utf-8" - + - + /caldav.php/user1/home/ - - - - - - + + + + + + @@ -222,17 +213,17 @@ Content-Type: text/xml; charset="utf-8" - + - + - + @@ -242,26 +233,27 @@ Content-Type: text/xml; charset="utf-8" - + - - + + + - - - - + + + + - - - - - - - + + + + + + + HTTP/1.1 404 Not Found @@ -271,13 +263,8 @@ Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/addresses/?add-member + /caldav.php/user1/addresses/?add_member - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - @@ -314,7 +301,7 @@ Content-Type: text/xml; charset="utf-8" user1 addresses - "24c9e15e52afc47c225b757e7bee1f9d" + "24c9e15e52afc47c225b757e7bee1f9d" 65500 /caldav.php/user1/ @@ -326,9 +313,9 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/home/ - + @@ -367,28 +354,29 @@ Content-Type: text/xml; charset="utf-8" - + - + + - + - - - - + + + + - - - - - - - - + + + + + + + + HTTP/1.1 404 Not Found @@ -398,13 +386,8 @@ Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/created/?add-member + /caldav.php/user1/created/?add_member - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - @@ -425,7 +408,7 @@ Content-Type: text/xml; charset="utf-8" - + @@ -444,7 +427,7 @@ Content-Type: text/xml; charset="utf-8" created - "bac273dae96780a3c8ed0c032266322c" + "bac273dae96780a3c8ed0c032266322c" /caldav.php/user1/ @@ -453,16 +436,16 @@ Content-Type: text/xml; charset="utf-8" - + - + /caldav.php/user1/home/ - - - - - - + + + + + + @@ -486,17 +469,17 @@ Content-Type: text/xml; charset="utf-8" - + - + - + @@ -506,28 +489,29 @@ Content-Type: text/xml; charset="utf-8" - + - + + - + - - - - + + + + - - - - - - - + + + + + + + HTTP/1.1 404 Not Found @@ -537,13 +521,8 @@ Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/.in/?add-member + /caldav.php/user1/.in/?add_member - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - @@ -579,20 +558,20 @@ Content-Type: text/xml; charset="utf-8" - + - + - + - + User 1 Inbox - "435712d0457c874316eb9cdd41cf92bc" + "435712d0457c874316eb9cdd41cf92bc" /caldav.php/user1/ @@ -601,16 +580,16 @@ Content-Type: text/xml; charset="utf-8" - + - + /caldav.php/user1/home/ - - - - - - + + + + + + @@ -639,28 +618,29 @@ Content-Type: text/xml; charset="utf-8" - + - + + - + - - - - + + + + - - - - - - - + + + + + + + HTTP/1.1 404 Not Found @@ -670,13 +650,8 @@ Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/.out/?add-member + /caldav.php/user1/.out/?add_member - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - @@ -712,20 +687,20 @@ Content-Type: text/xml; charset="utf-8" - + - + - + - + User 1 Outbox - "1" + "1" /caldav.php/user1/ @@ -734,16 +709,16 @@ Content-Type: text/xml; charset="utf-8" - + - + /caldav.php/user1/home/ - - - - - - + + + + + + @@ -772,28 +747,29 @@ Content-Type: text/xml; charset="utf-8" - + - + + - + - - - - + + + + - - - - - - - + + + + + + + HTTP/1.1 404 Not Found @@ -803,14 +779,9 @@ Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/?add-member + /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/?add_member #391B71A0 - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - @@ -831,7 +802,7 @@ Content-Type: text/xml; charset="utf-8" - + @@ -850,7 +821,7 @@ Content-Type: text/xml; charset="utf-8" iCal Calendar - "ac192d10783fff90598af2facc8259df" + "ac192d10783fff90598af2facc8259df" /caldav.php/user1/ @@ -859,16 +830,16 @@ Content-Type: text/xml; charset="utf-8" - + - + /caldav.php/user1/home/ - - - - - - + + + + + + @@ -892,17 +863,17 @@ Content-Type: text/xml; charset="utf-8" - + - + - + @@ -912,27 +883,28 @@ Content-Type: text/xml; charset="utf-8" - + - + + - + - - - - + + + + - - - - - - - + + + + + + + HTTP/1.1 404 Not Found @@ -942,13 +914,8 @@ Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/calendar-proxy-read/?add-member + /caldav.php/user1/calendar-proxy-read/?add_member - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - @@ -969,7 +936,7 @@ Content-Type: text/xml; charset="utf-8" - + @@ -988,17 +955,17 @@ Content-Type: text/xml; charset="utf-8" /user1/calendar-proxy-read/ - "abad5538c4aa570cc54b6ff0d36a4565" + "abad5538c4aa570cc54b6ff0d36a4565" /caldav.php/user1/ - + - + /caldav.php/user1/home/ - + @@ -1022,17 +989,17 @@ Content-Type: text/xml; charset="utf-8" - + - + - + @@ -1051,31 +1018,32 @@ Content-Type: text/xml; charset="utf-8" - + - + + - + - - - - + + + + - - - - - - + + + + + + - - + + HTTP/1.1 404 Not Found @@ -1085,13 +1053,8 @@ Content-Type: text/xml; charset="utf-8" - /caldav.php/user1/calendar-proxy-write/?add-member + /caldav.php/user1/calendar-proxy-write/?add_member - - /caldav.php/user1/home/ - /caldav.php/user1/created/ - /caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/ - @@ -1112,7 +1075,7 @@ Content-Type: text/xml; charset="utf-8" - + @@ -1131,17 +1094,17 @@ Content-Type: text/xml; charset="utf-8" /user1/calendar-proxy-write/ - "04ba2c2164225fb5abce13f2c523b6c7" + "04ba2c2164225fb5abce13f2c523b6c7" /caldav.php/user1/ - + - + /caldav.php/user1/home/ - + @@ -1165,17 +1128,17 @@ Content-Type: text/xml; charset="utf-8" - + - + - + @@ -1194,31 +1157,32 @@ Content-Type: text/xml; charset="utf-8" - + - + + - + - - - - + + + + - - - - - - + + + + + + - - + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/0912-Space-PROPFIND.result b/testing/tests/regression-suite/0912-Space-PROPFIND.result index 77674aa9..6e40dfb1 100644 --- a/testing/tests/regression-suite/0912-Space-PROPFIND.result +++ b/testing/tests/regression-suite/0912-Space-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, bind, addressbook, calendar-auto-schedule, calendar-proxy -ETag: "f640afc35eb1b3892d84512c69748944" -Content-Length: 4581 +ETag: "4958f56cf9ec116e609399113e3e021e" +Content-Length: 3633 Content-Type: text/xml; charset="utf-8" @@ -18,10 +18,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/User%20Six/home/ - /caldav.php/User%20Six/DEADBEEF-EFD9-4F0F-9BDC-5335E04D47E0/ - HTTP/1.1 200 OK @@ -30,6 +26,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -44,10 +41,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/User%20Six/home/ - /caldav.php/User%20Six/DEADBEEF-EFD9-4F0F-9BDC-5335E04D47E0/ - HTTP/1.1 200 OK @@ -56,6 +49,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -70,10 +64,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/User%20Six/home/ - /caldav.php/User%20Six/DEADBEEF-EFD9-4F0F-9BDC-5335E04D47E0/ - HTTP/1.1 200 OK @@ -82,6 +72,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -97,10 +88,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/User%20Six/home/ - /caldav.php/User%20Six/DEADBEEF-EFD9-4F0F-9BDC-5335E04D47E0/ - HTTP/1.1 200 OK @@ -108,6 +95,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -122,10 +110,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/User%20Six/home/ - /caldav.php/User%20Six/DEADBEEF-EFD9-4F0F-9BDC-5335E04D47E0/ - HTTP/1.1 200 OK @@ -134,6 +118,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found @@ -148,10 +133,6 @@ Content-Type: text/xml; charset="utf-8" - - /caldav.php/User%20Six/home/ - /caldav.php/User%20Six/DEADBEEF-EFD9-4F0F-9BDC-5335E04D47E0/ - HTTP/1.1 200 OK @@ -160,6 +141,7 @@ Content-Type: text/xml; charset="utf-8" + HTTP/1.1 404 Not Found From 9997f3a912d6b4db8f6afd33d397c2583aec354a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:12:23 +0100 Subject: [PATCH 09/16] Enforce ordering on sample data for more consistent test results. --- testing/tests/regression-suite/sample-data.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/testing/tests/regression-suite/sample-data.sql b/testing/tests/regression-suite/sample-data.sql index 6c16ee42..89ed56b6 100644 --- a/testing/tests/regression-suite/sample-data.sql +++ b/testing/tests/regression-suite/sample-data.sql @@ -52,7 +52,7 @@ INSERT INTO collection (user_no, parent_container, dav_name, dav_etag, SELECT user_no, '/' || username || '/', '/' || username || '/home/', md5(username), username || ' home', TRUE, '2009-06-03', '2009-06-04', FALSE, FALSE, user_no + 150, '' - FROM usr; + FROM usr ORDER BY user_no; INSERT INTO collection (user_no, parent_container, dav_name, dav_etag, dav_displayname, is_calendar, is_addressbook, created, modified, @@ -60,24 +60,24 @@ INSERT INTO collection (user_no, parent_container, dav_name, dav_etag, SELECT user_no, '/' || username || '/', '/' || username || '/addresses/', md5(username), username || ' addresses', FALSE, TRUE, '1957-07-26', '1998-03-16', FALSE, FALSE, user_no + 450, '' - FROM usr; + FROM usr ORDER BY user_no; 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) AND NOT EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Resource' AND role_member.user_no = usr.user_no) - AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no); + AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no) ORDER BY user_no; INSERT INTO principal (type_id, user_no, displayname, default_privileges) SELECT 2, user_no, fullname, privilege_to_bits(ARRAY['read','schedule-send','schedule-deliver']) FROM usr WHERE EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Resource' AND role_member.user_no = usr.user_no) - AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no); + AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no) ORDER BY user_no; INSERT INTO principal (type_id, user_no, displayname, default_privileges) SELECT 3, user_no, fullname, privilege_to_bits(ARRAY['read-free-busy','schedule-send','schedule-deliver']) FROM usr WHERE EXISTS(SELECT 1 FROM role_member JOIN roles USING(role_no) WHERE role_name = 'Group' AND role_member.user_no = usr.user_no) - AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no); + AND NOT EXISTS(SELECT 1 FROM principal WHERE principal.user_no = usr.user_no) ORDER BY user_no; -- Set the insert sequence to the next number, with a minimum of 1000 SELECT setval('relationship_type_rt_id_seq', (SELECT 10 UNION SELECT rt_id FROM relationship_type ORDER BY 1 DESC LIMIT 1) ); @@ -114,7 +114,7 @@ UPDATE relationship r SET confers = (SELECT bit_confers FROM relationship_type r INSERT INTO group_member ( group_id, member_id) SELECT g.principal_id, m.principal_id FROM relationship JOIN principal g ON(to_user=g.user_no AND g.type_id = 3) -- Group - JOIN principal m ON(from_user=m.user_no AND m.type_id IN (1,2)); -- Person | Resource + JOIN principal m ON(from_user=m.user_no AND m.type_id IN (1,2)) ORDER BY 1, 2; -- Person | Resource INSERT INTO grants ( by_principal, to_principal, privileges, is_group ) SELECT pby.principal_id AS by_principal, pto.principal_id AS to_principal, @@ -123,4 +123,4 @@ INSERT INTO grants ( by_principal, to_principal, privileges, is_group ) JOIN usr t ON(t.user_no=r.to_user) JOIN principal pby ON(t.user_no=pby.user_no) JOIN principal pto ON(pto.user_no=f.user_no) - WHERE rt_id < 4 AND pby.type_id < 3; + WHERE rt_id < 4 AND pby.type_id < 3 ORDER BY 1, 2; From 083fc6dd3be327c091dd1652b7243e7a822efd65 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:22:26 +0100 Subject: [PATCH 10/16] getCacheInstance() is the canonical way to get a reference to the cache. --- inc/Principal.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/Principal.php b/inc/Principal.php index dbbce240..0cb2f0d2 100644 --- a/inc/Principal.php +++ b/inc/Principal.php @@ -150,7 +150,7 @@ class Principal { throw new Exception('Can only retrieve a Principal by user_no,principal_id,username or email address'); } - $cache = new AwlCache(); + $cache = getCacheInstance(); if ( $use_cache && isset($session->principal_id) ) { switch ( $type ) { case 'user_no': @@ -498,7 +498,7 @@ class Principal { public function unCache() { if ( !isset($this->cacheNs) ) return; - $cache = new AwlCache(); + $cache = getCacheInstance(); $cache->delete($this->cacheNs, null ); } @@ -601,7 +601,7 @@ class Principal { } static public function cacheFlush( $where, $whereparams=array() ) { - $cache = new AwlCache(); + $cache = getCacheInstance(); if ( !$cache->isActive() ) return; $qry = new AwlQuery('SELECT dav_name FROM dav_principal WHERE '.$where, $whereparams ); if ( $qry->Exec('Principal',__FILE__,__LINE__) ) { @@ -612,7 +612,7 @@ class Principal { } static public function cacheDelete( $type, $value ) { - $cache = new AwlCache(); + $cache = getCacheInstance(); if ( !$cache->isActive() ) return; if ( $type == 'username' ) { $value = '/'.$value.'/'; From 9f180c9b8f62b3265e6959ebceb038eba451805b Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:23:45 +0100 Subject: [PATCH 11/16] Sending HTTP headers for TODO seems a bit passive-aggressive! --- inc/schedule-functions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/schedule-functions.php b/inc/schedule-functions.php index d011c369..2ee96123 100644 --- a/inc/schedule-functions.php +++ b/inc/schedule-functions.php @@ -73,7 +73,7 @@ function doItipAttendeeReply( vCalendar $resource, $partstat ) { if ( !$organizer_principal->Exists() ) { dbg_error_log( 'schedule', 'Unknown ORGANIZER "%s" - unable to notify.', $organizer->Value() ); - header( "Debug: Could maybe do the iMIP message dance for organizer ". $organizer->Value() ); + //TODO: header( "Debug: Could maybe do the iMIP message dance for organizer ". $organizer->Value() ); return true; } @@ -177,7 +177,7 @@ function doItipAttendeeReply( vCalendar $resource, $partstat ) { } } else { - header( "Debug: Could maybe do the iMIP message dance for attendee ". $email ); + //TODO: header( "Debug: Could maybe do the iMIP message dance for attendee ". $email ); } } @@ -280,7 +280,7 @@ function processItipCancel( vCalendar $vcal, vProperty $attendee, WritableCollec global $request; dbg_error_log( 'schedule', 'Processing iTIP CANCEL to %s', $attendee->Value()); - header( "Debug: Could maybe do the iMIP message dance for attendee ". $attendee->Value() ); + //TODO: header( "Debug: Could maybe do the iMIP message dance for attendee ". $attendee->Value() ); if ( !$attendee_calendar->Exists() ) { if ( doImipMessage('CANCEL', $attendee_principal->email(), $vcal) ) { return '1.1'; // Scheduling whoosit 'Sent' @@ -332,7 +332,7 @@ function processItipCancel( vCalendar $vcal, vProperty $attendee, WritableCollec */ function deliverItipCancel( vCalendar $iTIP, vProperty $attendee, WritableCollection $attendee_inbox ) { $attendee_inbox->WriteCalendarMember($iTIP, false); - header( "Debug: Could maybe do the iMIP message dance canceling for attendee: ".$attendee->Value()); + //TODO: header( "Debug: Could maybe do the iMIP message dance canceling for attendee: ".$attendee->Value()); } require_once('Multipart.php'); From aafd81ffd73df047082f004f2d8302d93b49b033 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:24:44 +0100 Subject: [PATCH 12/16] Remove array slice reference on method return value. Eclipse complained about the syntax, and since it was the only complaint it had I thought it worth dealing with :-) --- inc/caldav-REPORT-cardquery.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/caldav-REPORT-cardquery.php b/inc/caldav-REPORT-cardquery.php index 07b4e6b3..c7a19634 100644 --- a/inc/caldav-REPORT-cardquery.php +++ b/inc/caldav-REPORT-cardquery.php @@ -54,7 +54,8 @@ if ( count($qry_filters) == 0 ) { $qry_limit = -1; // everything $qry_filters_combination='OR'; if ( is_array($qry_filters) ) { - $filters_parent = $xmltree->GetPath('/urn:ietf:params:xml:ns:carddav:addressbook-query/urn:ietf:params:xml:ns:carddav:filter')[0]; + $filters_parent = $xmltree->GetPath('/urn:ietf:params:xml:ns:carddav:addressbook-query/urn:ietf:params:xml:ns:carddav:filter'); + $filters_parent = $filters_parent[0]; // only anyof (OR) or allof (AND) allowed, if missing anyof is default (RFC6352 10.5) if ( $filters_parent->GetAttribute("test") == 'allof' ) { $qry_filters_combination='AND'; From b85f8e79fe7855642072cdb40c764a4a1ef1fc7e Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:26:24 +0100 Subject: [PATCH 13/16] Fail better! There's a long-standing annoyance about catching errors in the early stages of startup - sometimes they seem to disappear nowhere and yet nothing works. This fixes at least part of that. --- htdocs/always.php | 21 ++++++++++ htdocs/caldav.php | 99 +++++++++++++++++++++++++++-------------------- inc/always.php.in | 21 ++++++++++ 3 files changed, 100 insertions(+), 41 deletions(-) diff --git a/htdocs/always.php b/htdocs/always.php index 9d9b9b9a..432a069d 100644 --- a/htdocs/always.php +++ b/htdocs/always.php @@ -42,6 +42,27 @@ function early_exception_handler($e) { } set_exception_handler('early_exception_handler'); +function early_catch_fatal_error() { + global $request; + + if ( !empty($request) ) return; + + // Getting Last Error + $e = error_get_last(); + + // Check if Last error is of type FATAL + if (isset($e['type']) && $e['type'] == E_ERROR) { + if ( !headers_sent() ) { + header("Content-type: text/plain"); + header( sprintf("HTTP/1.1 %d %s", 500, getStatusMessage(500)) ); + } + echo "PHP Fatal error: ".$e['message']."\n"; + echo "At line ", $e['line'], " of ", $e['file'], "\n"; + error_log("PHP Fatal Error: '".$e['message']. "' at line ". $e['line']. " of ". $e['file']); + } +} +register_shutdown_function('early_catch_fatal_error'); + $c->default_timezone = ini_get ( 'date.timezone' ); if (empty ( $c->default_timezone )) { if (isset ( $_SERVER ['HTTP_X_DAVICAL_TESTCASE'] )) { diff --git a/htdocs/caldav.php b/htdocs/caldav.php index 78f07310..ba7fc896 100644 --- a/htdocs/caldav.php +++ b/htdocs/caldav.php @@ -75,6 +75,17 @@ function send_dav_header() { require_once('CalDAVRequest.php'); $request = new CalDAVRequest(); +function late_catch_fatal_error() { + global $request; + + // Getting Last Error + $e = error_get_last(); + if (isset($e['type']) && $e['type'] == E_ERROR) { + $request->DoResponse(500, "Fatal PHP Error"); + } +} +register_shutdown_function('late_catch_fatal_error'); + //if ( $request->method == 'OPTIONS' || $c->always_send_dav_header ) send_dav_header(); // Avoid polluting global namespace @@ -94,50 +105,56 @@ if ( ! ($request->IsPrincipal() || isset($request->collection) || $request->meth param_to_global('add_member', '.*', 'add-member'); $add_member = isset($add_member); -switch ( $request->method ) { - case 'OPTIONS': include_once('caldav-OPTIONS.php'); break; - case 'REPORT': include_once('caldav-REPORT.php'); break; - case 'PROPFIND': include('caldav-PROPFIND.php'); break; - case 'GET': include('caldav-GET.php'); break; - case 'HEAD': include('caldav-GET.php'); break; - case 'PROPPATCH': include('caldav-PROPPATCH.php'); break; - case 'POST': - if ( $request->content_type != 'text/vcard' && !$add_member ) { - include('caldav-POST.php'); +try { + + switch ( $request->method ) { + case 'OPTIONS': include_once('caldav-OPTIONS.php'); break; + case 'REPORT': include_once('caldav-REPORT.php'); break; + case 'PROPFIND': include('caldav-PROPFIND.php'); break; + case 'GET': include('caldav-GET.php'); break; + case 'HEAD': include('caldav-GET.php'); break; + case 'PROPPATCH': include('caldav-PROPPATCH.php'); break; + case 'POST': + if ( $request->content_type != 'text/vcard' && !$add_member ) { + include('caldav-POST.php'); + break; + } + case 'PUT': + switch( $request->content_type ) { + case 'text/calendar': + include('caldav-PUT-vcalendar.php'); + break; + case 'text/vcard': + case 'text/x-vcard': + include('caldav-PUT-vcard.php'); + break; + default: + include('caldav-PUT-default.php'); + break; + } break; - } - case 'PUT': - switch( $request->content_type ) { - case 'text/calendar': - include('caldav-PUT-vcalendar.php'); - break; - case 'text/vcard': - case 'text/x-vcard': - include('caldav-PUT-vcard.php'); - break; - default: - include('caldav-PUT-default.php'); - break; - } - break; - case 'MKCALENDAR': include('caldav-MKCOL.php'); break; - case 'MKCOL': include('caldav-MKCOL.php'); break; - case 'DELETE': include('caldav-DELETE.php'); break; - case 'MOVE': include('caldav-MOVE.php'); break; - case 'ACL': include('caldav-ACL.php'); break; - case 'LOCK': include('caldav-LOCK.php'); break; - case 'UNLOCK': include('caldav-LOCK.php'); break; - case 'MKTICKET': include('caldav-MKTICKET.php'); break; - case 'DELTICKET': include('caldav-DELTICKET.php'); break; - case 'BIND': include('caldav-BIND.php'); break; + case 'MKCALENDAR': include('caldav-MKCOL.php'); break; + case 'MKCOL': include('caldav-MKCOL.php'); break; + case 'DELETE': include('caldav-DELETE.php'); break; + case 'MOVE': include('caldav-MOVE.php'); break; + case 'ACL': include('caldav-ACL.php'); break; + case 'LOCK': include('caldav-LOCK.php'); break; + case 'UNLOCK': include('caldav-LOCK.php'); break; + case 'MKTICKET': include('caldav-MKTICKET.php'); break; + case 'DELTICKET': include('caldav-DELTICKET.php'); break; + case 'BIND': include('caldav-BIND.php'); break; - case 'TESTRRULE': include('test-RRULE-v2.php'); break; + case 'TESTRRULE': include('test-RRULE-v2.php'); break; - default: - dbg_error_log( 'caldav', 'Unhandled request method >>%s<<', $request->method ); - dbg_log_array( 'caldav', '_SERVER', $_SERVER, true ); - dbg_error_log( 'caldav', 'RAW: %s', str_replace("\n", '',str_replace("\r", '', $request->raw_post)) ); + default: + dbg_error_log( 'caldav', 'Unhandled request method >>%s<<', $request->method ); + dbg_log_array( 'caldav', '_SERVER', $_SERVER, true ); + dbg_error_log( 'caldav', 'RAW: %s', str_replace("\n", '',str_replace("\r", '', $request->raw_post)) ); + } + +} catch (Exception $e) { + trace_bug('DAViCal Fatal Error'); + $request->DoResponse( 500, translate('DAViCal Fatal Error') ); } $request->DoResponse( 400, translate('The application program does not understand that request.') ); - diff --git a/inc/always.php.in b/inc/always.php.in index 57068532..5ad55980 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -42,6 +42,27 @@ function early_exception_handler($e) { } set_exception_handler('early_exception_handler'); +function early_catch_fatal_error() { + global $request; + + if ( !empty($request) ) return; + + // Getting Last Error + $e = error_get_last(); + + // Check if Last error is of type FATAL + if (isset($e['type']) && $e['type'] == E_ERROR) { + if ( !headers_sent() ) { + header("Content-type: text/plain"); + header( sprintf("HTTP/1.1 %d %s", 500, getStatusMessage(500)) ); + } + echo "PHP Fatal error: ".$e['message']."\n"; + echo "At line ", $e['line'], " of ", $e['file'], "\n"; + error_log("PHP Fatal Error: '".$e['message']. "' at line ". $e['line']. " of ". $e['file']); + } +} +register_shutdown_function('early_catch_fatal_error'); + $c->default_timezone = ini_get ( 'date.timezone' ); if (empty ( $c->default_timezone )) { if (isset ( $_SERVER ['HTTP_X_DAVICAL_TESTCASE'] )) { From 7c537225353928a25622454d5eaed3ab0f5cc725 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:41:10 +0100 Subject: [PATCH 14/16] Ignore some local cruft. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 7affe282..02743efb 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,6 @@ zonedb/tzcode zonedb/tzdata zonedb/vtimezones zonedb/*.tar.gz +.idea +*.orig +zonedb/releases From 1ab66a70b5b3a1fd24c7199b62ef42e34a006790 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:44:10 +0100 Subject: [PATCH 15/16] Some database changes for server-side attendee handling. --- dba/davical.sql | 21 ++++++++++- dba/patches/1.3.1.sql | 36 +++++++++++++++++++ .../Really-Upgrade-Database.result | 2 +- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 dba/patches/1.3.1.sql diff --git a/dba/davical.sql b/dba/davical.sql index 20f5b7e1..a06a5646 100644 --- a/dba/davical.sql +++ b/dba/davical.sql @@ -406,6 +406,23 @@ CREATE TABLE calendar_alarm ( trigger_state CHAR DEFAULT 'N' -- 'N' => 'New/Needs setting', 'A' = 'Active', 'O' = 'Old' ); + +CREATE TABLE calendar_attendee_email_status ( + email_status_id INT8 PRIMARY KEY, + description TEXT NOT NULL +); + +INSERT INTO calendar_attendee_email_status (email_status_id, description) + VALUES + (1, 'waiting for invitation to be sent'), + (2, 'invitation has been sent'), + (3, 'waiting for schedule change to be sent'), + (4, 'schedule change has been sent'), + (11, 'attendee has accepted'), + (12, 'attendee indicated maybe'), + (13, 'attendee has refused') +; + CREATE TABLE calendar_attendee ( dav_id INT8 NOT NULL REFERENCES caldav_data(dav_id) ON UPDATE CASCADE ON DELETE CASCADE, status TEXT, @@ -417,6 +434,8 @@ CREATE TABLE calendar_attendee ( property TEXT, -- The full text of the property attendee_state TEXT, -- Internal DAViCal processing state weak_etag TEXT, -- The week_etag applying for this attendee state + email_status INT REFERENCES calendar_attendee_email_status(email_status_id) DEFAULT 1 NOT NULL, + is_remote BOOLEAN DEFAULT false, PRIMARY KEY ( dav_id, attendee ) ); @@ -449,4 +468,4 @@ $$ LANGUAGE plpgsql ; ALTER TABLE dav_binding ADD CONSTRAINT "dav_name_does_not_exist" CHECK (NOT real_path_exists(dav_name)); -SELECT new_db_revision(1,2,12, 'Decembre' ); +SELECT new_db_revision(1,3,1, 'Styczeń' ); diff --git a/dba/patches/1.3.1.sql b/dba/patches/1.3.1.sql new file mode 100644 index 00000000..2777e448 --- /dev/null +++ b/dba/patches/1.3.1.sql @@ -0,0 +1,36 @@ + +-- Notable enhancement: Add/Alter tables for dealing with remote attendee handling + +BEGIN; +SELECT check_db_revision(1,2,12); + + +CREATE TABLE calendar_attendee_email_status ( + email_status_id INT8 PRIMARY KEY, + description TEXT NOT NULL +); + +INSERT INTO calendar_attendee_email_status (email_status_id, description) + VALUES + (1, 'waiting for invitation to be sent'), + (2, 'invitation has been sent'), + (3, 'waiting for schedule change to be sent'), + (4, 'schedule change has been sent'), + (11, 'attendee has accepted'), + (12, 'attendee indicated maybe'), + (13, 'attendee has refused') +; + + +ALTER TABLE calendar_attendee + ADD COLUMN email_status INT REFERENCES calendar_attendee_email_status(email_status_id) DEFAULT 1 NOT NULL ; + +ALTER TABLE calendar_attendee + ADD COLUMN is_remote BOOLEAN DEFAULT FALSE; + +-- A new year! http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/ +SELECT new_db_revision(1,3,1, 'Styczeń' ); + +COMMIT; +ROLLBACK; + diff --git a/testing/tests/regression-suite/Really-Upgrade-Database.result b/testing/tests/regression-suite/Really-Upgrade-Database.result index 6ac7ed41..7273afdb 100644 --- a/testing/tests/regression-suite/Really-Upgrade-Database.result +++ b/testing/tests/regression-suite/Really-Upgrade-Database.result @@ -1,4 +1,4 @@ -The database is version 9.4 currently at revision 1.2.11. +The database is version 9.5 currently at revision 1.3.1. No patches were applied. Supported locales updated. Updated view: dav_principal.sql applied. From c5c0421caf278268db7222a850a4d7e76ef4f0cc Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 22 Jun 2016 23:53:22 +0100 Subject: [PATCH 16/16] Add /metrics.php to be scraped by Prometheus for monitoring. --- config/example-config.php | 23 ++++++ dba/appuser_permissions.txt | 20 +++++ dba/davical.sql | 23 +++++- dba/patches/1.3.2.sql | 32 ++++++++ htdocs/metrics.php | 147 ++++++++++++++++++++++++++++++++++++ inc/CalDAVRequest.php | 99 ++++++++++++++++++++++-- 6 files changed, 336 insertions(+), 8 deletions(-) create mode 100644 dba/patches/1.3.2.sql create mode 100644 htdocs/metrics.php diff --git a/config/example-config.php b/config/example-config.php index 4bc07b9b..6028b5e8 100644 --- a/config/example-config.php +++ b/config/example-config.php @@ -438,3 +438,26 @@ $c->admin_email ='calendar-admin@example.com'; // // 'debug_jid' => 'otheruser@example.com' // send a copy of all publishes to this jid // ); // include ( 'pubsub.php' ); + + +/*************************************************************************** +* * +* Detailed Metrics * +* * +***************************************************************************/ + +/* +* This enables a /metrics.php URL containing detailed metrics about the +* operation of DAViCal. Ideally you will be running memcache if you are +* interested in keeping metrics, but there is a simple metrics collection +* available to you without running memcache. +* +* Note that there is currently no way of enabling metrics via memcache +* without memcache being enabled for all of DAViCal. +*/ +// $c->metrics_style = 'counters'; // Just the simple counter-based metrics +// $c->metrics_style = 'memcache'; // Only the metrics using memcache +// $c->metrics_style = 'both'; // Both styles of metrics +// $c->metrics_collectors = array('127.0.0.1'); // Restrict access to only this IP address +// $c->metrics_require_user = 'metricsuser'; // Restrict access to only connections authenticating as this user + diff --git a/dba/appuser_permissions.txt b/dba/appuser_permissions.txt index a7eba5be..bcd5b90f 100644 --- a/dba/appuser_permissions.txt +++ b/dba/appuser_permissions.txt @@ -58,6 +58,26 @@ GRANT SELECT,UPDATE ON principal_type_principal_type_id_seq ON sync_tokens_sync_token_seq ON timezones_our_tzno_seq + ON metrics_count_acl + ON metrics_count_bind + ON metrics_count_delete + ON metrics_count_delticket + ON metrics_count_get + ON metrics_count_head + ON metrics_count_lock + ON metrics_count_mkcalendar + ON metrics_count_mkcol + ON metrics_count_mkticket + ON metrics_count_move + ON metrics_count_options + ON metrics_count_post + ON metrics_count_propfind + ON metrics_count_proppatch + ON metrics_count_put + ON metrics_count_report + ON metrics_count_unknown + ON metrics_count_unlock + GRANT SELECT ON supported_locales diff --git a/dba/davical.sql b/dba/davical.sql index a06a5646..50fb4907 100644 --- a/dba/davical.sql +++ b/dba/davical.sql @@ -468,4 +468,25 @@ $$ LANGUAGE plpgsql ; ALTER TABLE dav_binding ADD CONSTRAINT "dav_name_does_not_exist" CHECK (NOT real_path_exists(dav_name)); -SELECT new_db_revision(1,3,1, 'Styczeń' ); +-- We create a bunch of counters for reporting basic statistics +CREATE SEQUENCE metrics_count_get; +CREATE SEQUENCE metrics_count_put; +CREATE SEQUENCE metrics_count_propfind; +CREATE SEQUENCE metrics_count_proppatch; +CREATE SEQUENCE metrics_count_report; +CREATE SEQUENCE metrics_count_head; +CREATE SEQUENCE metrics_count_options; +CREATE SEQUENCE metrics_count_post; +CREATE SEQUENCE metrics_count_mkcalendar; +CREATE SEQUENCE metrics_count_mkcol; +CREATE SEQUENCE metrics_count_delete; +CREATE SEQUENCE metrics_count_move; +CREATE SEQUENCE metrics_count_acl; +CREATE SEQUENCE metrics_count_lock; +CREATE SEQUENCE metrics_count_unlock; +CREATE SEQUENCE metrics_count_mkticket; +CREATE SEQUENCE metrics_count_delticket; +CREATE SEQUENCE metrics_count_bind; +CREATE SEQUENCE metrics_count_unknown; + +SELECT new_db_revision(1,3,2, 'Luty' ); diff --git a/dba/patches/1.3.2.sql b/dba/patches/1.3.2.sql new file mode 100644 index 00000000..db88ccd5 --- /dev/null +++ b/dba/patches/1.3.2.sql @@ -0,0 +1,32 @@ + +-- Notable enhancement: Sequence counters for reporting metrics for monitoring. + +BEGIN; +SELECT check_db_revision(1,3,1); + +CREATE SEQUENCE metrics_count_get; +CREATE SEQUENCE metrics_count_put; +CREATE SEQUENCE metrics_count_propfind; +CREATE SEQUENCE metrics_count_proppatch; +CREATE SEQUENCE metrics_count_report; +CREATE SEQUENCE metrics_count_head; +CREATE SEQUENCE metrics_count_options; +CREATE SEQUENCE metrics_count_post; +CREATE SEQUENCE metrics_count_mkcalendar; +CREATE SEQUENCE metrics_count_mkcol; +CREATE SEQUENCE metrics_count_delete; +CREATE SEQUENCE metrics_count_move; +CREATE SEQUENCE metrics_count_acl; +CREATE SEQUENCE metrics_count_lock; +CREATE SEQUENCE metrics_count_unlock; +CREATE SEQUENCE metrics_count_mkticket; +CREATE SEQUENCE metrics_count_delticket; +CREATE SEQUENCE metrics_count_bind; +CREATE SEQUENCE metrics_count_unknown; + +-- A new year! http://blogs.transparent.com/polish/names-of-the-months-and-their-meaning/ +SELECT new_db_revision(1,3,2, 'Luty' ); + +COMMIT; +ROLLBACK; + diff --git a/htdocs/metrics.php b/htdocs/metrics.php new file mode 100644 index 00000000..170ee66d --- /dev/null +++ b/htdocs/metrics.php @@ -0,0 +1,147 @@ + + * @copyright Andrew McMillan + * @license http://gnu.org/copyleft/gpl.html GNU GPL v2 or later + */ + +header("Content-type: text/plain; version=0.4.0"); + +require_once('./always.php'); + +// If necessary, validate they are coming from an allowed address +if ( isset($c->metrics_collectors) && !in_array($_SERVER['REMOTE_ADDR'], $c->metrics_collectors) ) { + echo "Nope."; + exit(0); +} + +// If necessary, validate that they are coming in as an authorized user +if ( isset($c->metrics_require_user) ) { + require_once('HTTPAuthSession.php'); + $session = new HTTPAuthSession(); + if ( $session->username != $c->metrics_require_user ) { + $session->AuthFailedResponse(); + echo "Nope."; + exit(0); + } +} + +// Validate that the metrics are actually turned on! +if ( !isset($c->metrics_style) || $c->metrics_style === false ) { + echo "Metrics are not enabled."; + exit(0); +} + +// Helper function to ensure we get the metric format consistent +function print_metric( $name, $qualifiers, $value ) { + print $name; + if ( !empty($qualifiers) ) { + print '{'; + $continuation = ''; + foreach( $qualifiers AS $k => $v ) { + if ( $continuation == '' ) { + $continuation = ','; + } else { + print $continuation; + } + printf( '%s="%s"', $k, $v); + } + print '}'; + } + echo ' ', $value, "\n"; +} + + +// If they want 'both' or 'all' or something then that's what they will get +// If they don't want counters, they must want to use memcache! +if ( $c->metrics_style != 'counters' ) { + // These are the preferred metrics, which include some internal details + // of the request processing. + include_once('AwlCache.php'); + $cache = getCacheInstance(); + + $index = unserialize($cache->get('metrics', 'index')); + print "# HELP caldav_request_status The DAViCal requests broken down by HTTP method and response status\n"; + print "# TYPE caldav_request_status counter\n"; + foreach( $index['methods'] AS $method => $ignored ) { + foreach( $index['statuses'] AS $status => $ignored ) { + $count = $cache->get('metrics', $method.':'.$status ); + if ( $count !== false ) { + print_metric("caldav_request_status", array('method'=>$method, 'status'=>$status), $count); + } + } + } + + print "\n"; + print "# HELP caldav_response_bytes The DAViCal response size by HTTP method\n"; + print "# TYPE caldav_response_bytes counter\n"; + foreach( $index['methods'] AS $method => $ignored ) { + $count = $cache->get('metrics', $method.':size'); + print_metric("caldav_request_bytes", array('method'=>$method), $count); + } + + $timings = array('script', 'query', 'flush'); + print "\n"; + print "# HELP caldav_request_microseconds The DAViCal response time taken in general, in queries, and in flushing buffers\n"; + print "# TYPE caldav_request_microseconds counter\n"; + foreach( $index['methods'] AS $method => $ignored ) { + foreach( $timings AS $timing ) { + $count = $cache->get('metrics', $method.':'.$timing.'_time'); + print_metric("caldav_request_microseconds", array('method'=>$method, 'timing'=>$timing), $count); + } + } +} + +// If they don't want memcache, they must want to use counters! +if ( $c->metrics_style != 'memcache' ) { + // These are more basic metrics. Just counts of requests, by type. + $sql = <<Exec("metrics", __LINE__ , __FILE__); + $row = (array) $qry->Fetch(); + print "\n"; + print "# HELP caldav_request_count The DAViCal requests broken down by HTTP method (get, put, propfind, etc.).\n"; + print "# TYPE caldav_request_count counter\n"; + foreach ($row as $k => $v) { + print_metric("caldav_request_count", array( "method" => str_replace("_count", "", $k)), $v); + } +} + +print "\n"; +print "# HELP davical_up Are the servers up.\n"; +print "# TYPE davical_up gauge\n"; +print_metric("davical_up", array('server'=>$c->sysabbr), 1); + +if ( function_exists('memory_get_usage') ) { + print "\n"; + print "# HELP davical_process_memory How much memory is this process using.\n"; + print "# TYPE davical_process_memory gauge\n"; + print_metric("davical_process_memory", array("pid" => getmypid(), 'type' => 'curr'), memory_get_usage()); + print_metric("davical_process_memory", array("pid" => getmypid(), 'type' => 'peak'), memory_get_peak_usage()); +} diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 864eafb6..cf84e74a 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -269,7 +269,7 @@ class CalDAVRequest } if ( !is_int($this->depth) && "infinity" == $this->depth ) $this->depth = DEPTH_INFINITY; $this->depth = intval($this->depth); - + /** * MOVE/COPY use a "Destination" header and (optionally) an "Overwrite" one. */ @@ -1301,20 +1301,22 @@ EOSQL; } } + $script_finish = microtime(true); + $script_time = $script_finish - $c->script_start_time; + $message_length = strlen($message); if ( $message != '' ) { - if ( !headers_sent() ) header( "Content-Length: ".strlen($message) ); + if ( !headers_sent() ) header( "Content-Length: ".$message_length ); echo $message; } if ( isset($c->dbg['caldav']) && $c->dbg['caldav'] ) { - if ( strlen($message) > 100 || strstr($message, "\n") ) { - $message = substr( preg_replace("#\s+#m", ' ', $message ), 0, 100) . (strlen($message) > 100 ? "..." : ""); + if ( $message_length > 100 || strstr($message, "\n") ) { + $message = substr( preg_replace("#\s+#m", ' ', $message ), 0, 100) . ($message_length > 100 ? "..." : ""); } dbg_error_log("caldav", "Status: %d, Message: %s, User: %d, Path: %s", $status, $message, $session->principal->user_no(), $this->path); } if ( isset($c->dbg['statistics']) && $c->dbg['statistics'] ) { - $script_time = microtime(true) - $c->script_start_time; $memory = ''; if ( function_exists('memory_get_usage') ) { $memory = sprintf( ', Memory: %dk, Peak: %dk', memory_get_usage()/1024, memory_get_peak_usage(true)/1024); @@ -1327,14 +1329,97 @@ EOSQL; } catch( Exception $ignored ) {} + if ( isset($c->metrics_style) && $c->metrics_style !== false ) { + $flush_time = microtime(true) - $script_finish; + $this->DoMetrics($status, $message_length, $script_time, $flush_time); + } + if ( isset($c->exit_after_memory_exceeds) && function_exists('memory_get_peak_usage') && memory_get_peak_usage(true) > $c->exit_after_memory_exceeds ) { // 64M @dbg_error_log("statistics", "Peak memory use exceeds %d bytes (%d) - killing process %d", $c->exit_after_memory_exceeds, memory_get_peak_usage(true), getmypid()); register_shutdown_function( 'CalDAVRequest::kill_on_exit' ); } - - + exit(0); } + + /** + * Record the metrics related to this request. + * + * @param status The HTTP status code for this response + * @param response_size The size of the response (bytes). + * @param script_time The time taken to generate the response (pre-sending) + * @param flush_time The time taken to send the response (buffers flushed) + */ + function DoMetrics($status, $response_size, $script_time, $flush_time) { + global $c; + static $ns = 'metrics'; + + $method = (empty($this->method) ? 'UNKNOWN' : $this->method); + + // If they want 'both' or 'all' or something then that's what they will get + // If they don't want counters, they must want to use memcache! + if ( $c->metrics_style != 'counters' ) { + $cache = getCacheInstance(); + if ( $cache->isActive() ) { + + $base_key = $method.':'; + $count_like_this = $cache->increment( $ns, $base_key.$status ); + $cache->increment( $ns, $base_key.'size', $response_size ); + $cache->increment( $ns, $base_key.'script_time', intval($script_time * 1000000) ); + $cache->increment( $ns, $base_key.'flush_time', intval($flush_time * 1000000) ); + $cache->increment( $ns, $base_key.'query_time', intval($c->total_query_time * 1000000) ); + + if ( $count_like_this == 1 ) { + // We need to maintain a set of details regarding the methods and statuses we have + // encountered, so we know what to retrieve. Since this is the first one like + // this, we add it to the index. + try { + $index = unserialize($cache->get($ns, 'index')); + } catch (Exception $e) { + $index = array('methods' => array(), 'statuses' => array()); + } + $index['methods'][$method] = 1; + $index['statuses'][$status] = 1; + $cache->set($ns, 'index', serialize($index), 0); + } + } + else { + error_log("Full statistics are only available with a working Memcache configuration"); + } + } + + // If they don't want memcache, they must want to use counters! + if ( $c->metrics_style != 'memcache' ) { + $qstring = "SELECT nextval('%s')"; + switch( $method ) { + case 'OPTIONS': + case 'REPORT': + case 'PROPFIND': + case 'GET': + case 'PUT': + case 'HEAD': + case 'PROPPATCH': + case 'POST': + case 'MKCALENDAR': + case 'MKCOL': + case 'DELETE': + case 'MOVE': + case 'ACL': + case 'LOCK': + case 'UNLOCK': + case 'MKTICKET': + case 'DELTICKET': + case 'BIND': + $counter = strtolower($this->method); + break; + default: + $counter = 'unknown'; + break; + } + $qry = new AwlQuery( "SELECT nextval('metrics_count_" . $counter . "')" ); + $qry->Exec('always',__LINE__,__FILE__); + } + } }