Conversation
The resource to reach can now be designated either by a resource type and an id, as before, or by a resource object carrying that id. Objects without an id are rejected, so that a single resource is always unambiguously designated. The 'resource_model' parameter is deprecated in favor of the first positional parameter, which now also accepts resource objects.
When the server advertises ETag support in its ServiceProviderConfig, replace, modify and delete make the request conditional on the resource not having changed, as described in RFC7644 section 3.14. The server answers with a 412 error when it has. Resource versions are also read from the ETag response header, which RFC7644 makes mandatory, and not only from the meta.version attribute, which it merely recommends.
When the server supports ETags and query is given a versioned resource object, it makes the read conditional. On a 304 Not Modified answer the object that was passed is returned back, and nothing is downloaded. The header is not sent along query parameters, since the server would then answer with a partial representation that the object cannot stand for.
The examples of RFC7643 are JSON, where 'W\/"x"' decodes to 'W/"x"'. The test payloads kept the JSON escaping in Python literals, which no server would ever send, and which now reaches the If-Match headers.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #47
fixes #45
fixes #13