@rfc2822 said in Unable to delete CalDav-Events when URL is redirect:
Thanks for your suggestion.
There is a bug in dav4android when processing DELETE request. GET, PUT and PROPFIND requests process a redirection, while DELETE request does not do this.
I have omitted this by intention, but of course there might be a case where it’s needed. However, DAVdroid receives its resource paths directly from the server, so there should be no resource URLs that redirect. Also, I wanted to avoid deleting the wrong resource (for instance, caused by an erroneous redirect) and I have never seen that an already existing resource has been renamed by the server so that a redirect on DELETE
would be necessary.
But modifying a wrong resource is really better?
In my eyes every request should be process a correct redirect or none.
Could you please tell us your use case where this is required?
This case happens when using “/.well-known/caldav/” as URL for davdroid. After upgrading my installation there were some old links which did not work, so I decided to switch to these URL to get a working solution also if the background URL changes. But since then I am unable to delete events.
This is especially a problem when using Owncloud or Nextcloud well-known redirects to keep the URLs consistent.
Why would DAVdroid DELETE
a well-known URL? It only deletes contacts, events and tasks from the server when they have been deleted locally before. Service detection with well-known URLs is in no way involved to that.
If only service detection is used, this will work of course. But if the discovered URL changes, I need to reconfigure everything. So I decided to directly use this existing rewrite to avoid problems when sometimes the URLs from Owncloud or Nextcloud change.