VJOURNAL: handle UID uniqueness error message
@pohly
Submitted by Patrick Ohly Assigned to SyncEvolution Community
Description
Apple Calendar server refuses to create a new VJOURNAL item if the UID is not unique. This started happening in nightly testing when introducing POST support. Before that, SyncEvolution would automatically use the same URL for old and new item and therefore detect the conflict and return "was merged" - see:
When PUT fails, we get a "code 412, class 4, Precondition Failed" error which triggers a search for the UID.
When POST fails, we get a very less specific "code 403, class 4, Forbidden" error back with more details in the XML body:
[DEVELOPER 00:00:14] stderr: Read block (364 bytes):
[DEVELOPER 00:00:14] stderr: [
[DEVELOPER 00:00:14] stderr:
[DEVELOPER 00:00:14] stderr:
[DEVELOPER 00:00:14] stderr: /calendars/uids/user01/tasks/c5490e736b6836c4d353d98bc78b3a3d.ics</href>
[DEVELOPER 00:00:14] stderr: </no-uid-conflict>
[DEVELOPER 00:00:14] stderr: UID already exists</error-description>
[DEVELOPER 00:00:14] stderr: </error>
]
[DEVELOPER 00:00:14] stderr: Running post_send hooks
[DEVELOPER 00:00:14] stderr: ah_post_send (#0), code is 403 (want 401), WWW-Authenticate is (none)
[DEVELOPER 00:00:14] stderr: Request ends, status 403 class 4xx, error line:
[DEVELOPER 00:00:14] stderr: 403 Forbidden
[DEBUG 00:00:14] POST: bad HTTP status: <status 1.1, code 403, class 4, Forbidden>, must not retry
The current handling of that is to do the same UID search, just in case that a UID conflict might be the reason. It would be better to parse the XML body and save the roundtrip time for the search.
Probably not that important, though.
Version: 1.4