#273: `valid-calendar-object-resource` precondition failure returns with a `403 FORBIDDEN`, should be `412 PRECONDITION FAILED` --------------------------------+------------------------------------------- Reporter: wsanchez@apple.com | Owner: cdaboo@apple.com Type: Defect | Status: closed Priority: 3: Important | Milestone: 1.x Component: Calendar Server | Version: Severity: Other | Resolution: worksforme Keywords: | --------------------------------+------------------------------------------- Comment (by mail@david-reid.com): Replying to [comment:5 cdaboo@apple.com]:
Section 12.1 defines how the 412 code should be used. Note that it says 412 MUST NOT be returned when there are no conditional headers present.
Section 16 talks about the precondition/postcondition behavior. Note that strictly speaking any valid 4xx status code could be used with those, its not just restricted to 403. But for all the CalDAV valid-xxx preconditions, 403 seems the most appropriate. In any case the rules for 412 apply - 412 is only returned when evaluation of the condition request headers indicate an error.
I saw the 403 when using conditional headers. -- Ticket URL: <https://trac.calendarserver.org/ticket/273#comment:6> CalendarServer </> HTTP/WebDAV/CalDAV Server