-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calendar-color "changes" namespace #4489
Comments
This is still an issue. The server is rewriting the namespace for this property into the wrong namespace. |
The same issue is also present for the |
The semantics for both properites is the same in both namespaces. Why don’t you set and read the property in the |
Other clients and servers give special meaning to
If I start writing to Out of the seven servers with which I am testing, this is the only scenario where setting or reading a property returns a non-error response with the property missing. I have to special-case this behaviour in my response parser, and I'd like to get rid of that hack too. |
I could not find code, which changes the namespace for these two properties. So this logic must be provided by Fastmail and is not part of Cyrus IMAP. (I looked for |
@WhyNotHugo I can not replicate your issue. In fact, we do have a test that asserts that this exact DAV property gets returned properly in a PROPFIND: https://github.com/cyrusimap/cyrus-imapd/blob/master/cassandane/tiny-tests/Caldav/calendar_setcolor |
I looked again on the calendar-colour. What Cyrus IMAP does, is to map the NS_APPLE:calendar-color to COLOR: iCalendar property, when the calendar is exported. That is, when one calls What Cyrus IMAP also does, is for iCalendar objects to extract from the CATEGORIES: properties values words, which sound like colour, and map them to color-property. This is however only done in jmap-code. About calendar-order there is no special handling, except in JMAP-code, which should not be relevant. By reading the code I cannot confirm the behaviour observed by you. By executing the command below, on my server, which runs Cyrus IMAP 3.8 with many patches, I also cannot confirm the behaviour described by you. I can give you access, so that you can try yourself towards the server I use. PROPFIND
→ <multistatus xmlns="DAV:" xmlns:ICAL="http://apple.com/ns/ical/" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/">
<response>
<href>/dav/calendars/user/me/Default/</href>
<propstat>
<prop><resourcetype><collection/><C:calendar/></resourcetype><ICAL:calendar-color><![CDATA[#4e9a06]]></ICAL:calendar-color></prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
<propstat>
<prop><calendar-color/></prop><status>HTTP/1.1 404 Not Found</status>
</propstat>
</response>
</multistatus> PROPPATCH:
→ <?xml version="1.0" encoding="utf-8"?>
<multistatus xmlns="DAV:" xmlns:ICAL="http://apple.com/ns/ical/"><response>
<href>/dav/calendars/user/me/Default/</href>
<propstat><prop><ICAL:calendar-color/></prop>
<status>HTTP/1.1 200 OK</status></propstat>
</response></multistatus> Again PROPFIND
<multistatus xmlns="DAV:" xmlns:ICAL="http://apple.com/ns/ical/" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:CS="http://calendarserver.org/ns/">
<response>
<href>/dav/calendars/user/me/Default/</href>
<propstat>
<prop>
<resourcetype><collection/><C:calendar/></resourcetype>
<ICAL:calendar-color><![CDATA[#777777]]></ICAL:calendar-color>
</prop>
<status>HTTP/1.1 200 OK</status></propstat>
<propstat><prop><calendar-color/></prop><status>HTTP/1.1 404 Not Found</status></propstat>
</response>
</multistatus> |
My testing was specifically done on Fastmail, are you aware on any downstream patches in this scope? My request is exactly: <propertyupdate xmlns="DAV:">
<set>
<prop>
<calendar-color xmlns="http://apple.com/ns/ical/">#ff00ff</calendar-color>
</prop>
</set>
</propertyupdate> And the response is: <?xml version="1.0" encoding="utf-8"?>
<multistatus xmlns="DAV:">
<response>
<href>/dav/calendars/user/vdirsyncer@fastmail.com/czfL2Bs8klqXYBlG/</href>
<propstat>
<prop>
<calendar-color/>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus> I also queried the above collection: <propfind xmlns=\"DAV:\"><prop><calendar-color xmlns=\"http://apple.com/ns/ical/\"/></prop></propfind> And got the following response: <?xml version="1.0" encoding="utf-8"?>
<multistatus xmlns="DAV:">
<response>
<href>/dav/calendars/user/vdirsyncer@fastmail.com/czfL2Bs8klqXYBlG/</href>
<propstat>
<prop>
<calendar-color><![CDATA[#ff00ff]]></calendar-color>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus> |
Conjecture: the XML parser used by the server is ignoring the |
I upload
and then see what is stored in the annotations database:
Color is updated to #4e9a09 in the database with the right name space. But fetching the data is wrong, as the reply skips all namespaces:
returns <?xml version="1.0" encoding="utf-8"?>
<multistatus xmlns="DAV:">
<response>
<href>/dav/calendars/user/me/Default/</href>
<propstat><prop><calendar-color><![CDATA[#4e9a09]]></calendar-color></prop><status>HTTP/1.1 200 OK</status></propstat>
<propstat><prop><calendar-color/></prop><status>HTTP/1.1 404 Not Found</status></propstat>
</response></multistatus> |
I'm setting a property on a calendar collection:
When I then read the property, it is missing from the response, but a same-named property with a different namespace is present.
As a result, a client application will assume that the property is "unset".
The text was updated successfully, but these errors were encountered: