Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return 404 for POST/PATCH requests with version > 0 for missing object
This reverts dba4944, which changed the response code from 404 to 412, on the grounds that the HTTP spec says 412 is appropriate for an If-Match (or If-Unmodified-Since-Version, in our case) when the entity doesn't exist. That makes sense for a PUT, which without the If-Match would succeed, but, per the PATCH spec (RFC 5789), a PATCH for a missing object should return a 404, and the HTTP spec (RFC 7232) also says that "A server MUST ignore all received preconditions if its response to the same request without those conditions would have been a status code other than a 2xx (Successful) or 412 (Precondition Failed)."
- Loading branch information
Showing
3 changed files
with
15 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters