I have custom built a CalDav server in C# for a product we are selling and everything works quite peachy. There is just one thing that is bothering me, but nowhere in the standards I could find a solution for my 'annoyance'.
When a client is connected to our CalDav server and creates a new Event
, the client tells the server what the UID
is for the Event that is submitted. Our server saves that Event
in it's own database (as a different model) and that object gets an ID
from our server.
I respond to the client that the object is saved and that it got a new location, which makes the client retrieve the latest version of the object.
But I would love to change the UID
of the Event that was sent by the client, to the ID
we use to look-up the object.
Is there a way to tell the client "I stored the object for you, but please retrieve this version, with a changed UID
and dump the old one?"
Because the way it works now is that the client indeed retrieves the newly created Event after it was sent to us (using a PUT
request), but because of the new UID
the Event
has, the client thinks it is a new object.
I already tried doing this by saying to the client that the item that they tried to post to /mycaldav/SOME-WEIRD-UID-HERE.ics
should actually be posted to /mycaldav/MY-OWN-UID.ics
.
This resulted in a post to the right URL, but with the wrong UID
.