This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First stage of supporting floating timezone for propfind_caldata
This will depend on having somewhere to hang the floatingtz in a structure that gets created during the request, and there's nothing there yet
- Loading branch information
Showing
1 changed file
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
9ae1fb9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, after looking at the code and thinking about this for 1/2 a day or so, my suggestion for propfind_caldata(), to support both calendar-query and calendar-multiget, is to create a hash table keyed by mailbox name with the data value being the floating tz component and store it in struct partial_caldata_t. If it wasn't for multiget we could have a caldav_propfind_by_collection() which did nothing by fetch the floating tz and then passes off to propfind_by_collection(). But since mutliget is random, we can't assume that we get the URLs sorted by mailbox.
9ae1fb9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're basically always going to be sorted by mailbox, so we can just close and open if the mboxname is changed. If somebody sends a pathological request, they get a pathological response.
9ae1fb9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually know that multiget URLs are sorted by collection? If so, then my caldav_propfind_by_collection() idea is simpler
9ae1fb9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly you're only multigetting from a single collection at once, based on clients I've seen.
9ae1fb9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And even if not, they probably iterate over the collection list and add them to the XML of the request - unless they're using a hash locally and not sorting, which would be a pretty lame client.
9ae1fb9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're probably right. Although the Apple client does prefer to do a sync-collection on calendar-home-set (which we don't currently support) and could theoretically have scrambled URLs, but I doubt it. I'm cool with your assumption until a lousy client proves otherwise.