So you must do twice like this :
screenshot at 2013-10-14 20 11 15
Thanks @rfc2822 for your work!
For (ostensibly) easier client configuration, I have a root URL redirect in place so that a user only needs to configure their cal/carddav client to point to calendar.example.com, and it redirects to /davical/caldav.php/$1 (I’m using davical). However, with davdroid it just shows an error that the HTTP 301 was received instead of following the redirect.
301 with WebDAV is quite complicated. Do you use the 301 just to provide a CalDAV/CardDAV capable URL? So this would be an enhancement, but not necessary for functionality because your users could just enter the long URL?
Correct, I’d be happy if it was considered a convenience for finding the anchor URL from which the actual WebDAV was served. For now davdroid works entering the long URL, but being able to use the short one would be much nicer.
Note that I’d like the short one to be saved as well, not used once and the redirect thrown away. In other words, when editing settings later on, the user friendly URL version should be used.
Noted. But when the original URL should be kept, a 302 redirection would be required instead of the 301. (Which isn’t relevant at the moment because there URL can’t be changed after adding the account now, see FAQ)
Fair enough, following the 301 and storing the redirected URL vs. following the 302 and storing the originally input URL would be more accurate.
Note: It seems like “keeping the URL” for 301 is not very well defined.
In the setup process (when resources are detected), one step is dependent of the other. Only the resulting calendar/address book URLs are stored while all the other URLs (current-user-principal, home-set etc.) are thrown away at the moment. So, the only URLs where 301/302 could make a difference are when the URLs referenced by
calendar-home-set are redirections. DAVdroid stores the URLs given by PROPFIND on the home sets and doesn’t check for redirections at this moment, so there are not redirections to be handled.
In the sync process, settings aren’t changed nevertheless so all redirections can be treated the same way.