caldav: add support for more props on MKCOL and PROPFIND - #211
Closed
mrusme wants to merge 1 commit into
Closed
Conversation
Read calendar-description, calendar-timezone, calendar-color and supported-calendar-component-set from a MKCOL request body, and report the color and the timezone in PROPFIND responses. Each property in the request body is matched together with its namespace. A flat "set>prop>name" struct tag cannot do that, because encoding/xml checks the namespace of such a tag against every element along the path rather than against the last one: naming one there matches nothing, and leaving it out matches the element in any namespace. The body is decoded through nested types instead. Calendar.Timezone is a parsed *ical.Calendar. RFC 4791 section 5.2.2 requires the property value to be an iCalendar object with exactly one VTIMEZONE component, and a value that is not one is rejected with the CALDAV:valid-calendar-data precondition of section 5.3.1.1. calendar-color belongs to Apple rather than to CalDAV, and is read and reported in the http://apple.com/ns/ical/ namespace.
2 tasks
Author
|
Sorry, this POS JavaScript UI on GitHub is not working. I didn't close or delete anything, what the actual... Anyway. Please review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Read calendar-description, calendar-timezone, calendar-color and supported-calendar-component-set from a MKCOL request body, and report the color and the timezone in PROPFIND responses.
Each property in the request body is matched together with its namespace. A flat "set>prop>name" struct tag cannot do that, because encoding/xml checks the namespace of such a tag against every element along the path rather than against the last one: naming one there matches nothing, and leaving it out matches the element in any namespace. The body is decoded through nested types instead.
Calendar.Timezone is a parsed *ical.Calendar. RFC 4791 section 5.2.2 requires the property value to be an iCalendar object with exactly one VTIMEZONE component, and a value that is not one is rejected with the CALDAV:valid-calendar-data precondition of section 5.3.1.1.
calendar-color belongs to Apple rather than to CalDAV, and is read and reported in the http://apple.com/ns/ical/ namespace.
//edit: This is a follow-up on #150 to make it clear and it was originally authored by @DeepDiver1975.