View Issue Details

IDProjectCategoryView StatusLast Update
0002493SOGoBackend Calendarpublic2014-09-15 15:47
ReporterMarten Gajda Assigned Toludovic  
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.1.0 
Target Version2.2.9Fixed in Version2.2.9 
Summary0002493: sync-token property not returned in PROPFIND
Description

According to http://tools.ietf.org/html/rfc6578#section-4 each collection that supports sync-collection MUST return a sync-token.
That doesn't work with SOGo.

Steps To Reproduce

Sending this request:

<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
<A:prop>
<A:sync-token />
</A:prop>
</A:propfind>

to http://sogo-demo.inverse.ca/SOGo/dav/sogo1/Calendar/personal

returns:

<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/SOGo/dav/sogo1/Calendar/personal</D:href>
<D:propstat>
<D:status>HTTP/1.1 200 OK</D:status>
<D:prop/>
</D:propstat>
<D:propstat>
<D:status>HTTP/1.1 404 Not Found</D:status>
<D:prop>
<D:sync-token/>
</D:prop>
</D:propstat>
</D:response>
</D:multistatus>

instead is should return:

<?xml version="1.0" encoding="utf-8"?>
<multistatus xmlns="DAV:">
<response>
<href>/SOGo/dav/sogo1/Calendar/personal</href>
<propstat>
<prop>
<sync-token>1384192109</sync-token>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>

TagsNo tags attached.

Activities

ludovic

ludovic

2013-11-11 13:04

administrator   ~0006213

Are you sure you read the spec correctly?

It says:

Purpose: Contains the value of the synchronization token as it would
be returned by a DAV:sync-collection report.

That's a REPORT.

ALL the examples in the spec use REPORT, just like DAV clients we're dealing with.

Marten Gajda

Marten Gajda

2013-11-12 04:45

reporter   ~0006219

Yes, sync-collection is a report, but you can query the sync-token in advance using a regular PROPFIND request, just like you would get a CTag.

They key in the purpose above is the word "as".

Purpose: Contains the value of the synchronization token as it would
be returned by a DAV:sync-collection report.

It means that the sync-token returned in response to the propfind request is the same that would be returned by a sync-collection request. It's meant to get the sync-token only, not the entire change set like a sync-collection report would return.

I use the following propfind request in CalDAV-Sync to get the sync-token in advance, along with a couple of other properties:

<?xml version="1.0" encoding="UTF-8"?>
<A:propfind xmlns:A="DAV:">
<A:prop>
<E:calendar-color xmlns:E="http://apple.com/ns/ical/&quot;/>
<A:current-user-privilege-set/>
<A:current-user-principal/>
<A:displayname/>
<B:getctag xmlns:B="http://calendarserver.org/ns/&quot;/>
<A:resourcetype/>
<A:sync-token />
<C:supported-calendar-component-set xmlns:C="urn:ietf:params:xml:ns:caldav"/>
<A:supported-report-set/>
</A:prop>
</A:propfind>

That way I know if anything has changed before I send a sync-collection request. The CTag is not part of the official standards, it's more like a workaround. That's why I prefer the sync-token if there is any.

I have to check for the supported-report-set anyway if I want to use sync-collection, so why not get the sync-token with the same request to safe an additional sync-collection request if nothing has changed.

ludovic

ludovic

2014-09-15 15:47

administrator   ~0007517

https://github.com/inverse-inc/sope/commit/0ee64d0309ecc96a29d7c788e56246aec3606ad5

Issue History

Date Modified Username Field Change
2013-11-11 12:58 Marten Gajda New Issue
2013-11-11 13:04 ludovic Note Added: 0006213
2013-11-12 04:45 Marten Gajda Note Added: 0006219
2013-11-19 09:02 ludovic Severity major => feature
2014-09-15 15:47 ludovic Target Version => 2.2.9
2014-09-15 15:47 ludovic Note Added: 0007517
2014-09-15 15:47 ludovic Status new => resolved
2014-09-15 15:47 ludovic Fixed in Version => 2.2.9
2014-09-15 15:47 ludovic Resolution open => fixed
2014-09-15 15:47 ludovic Assigned To => ludovic