hiro117 / scim

Automatically exported from code.google.com/p/scim
0 stars 0 forks source link

If ETags is required, also send them when doing PUT and PATCH #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Change following text so that if server requires it it should be MUST.
----
Similarly, consumers MAY supply an If-Match ETag header for PUT, PATCH, and 
DELETE operations to ensure that the requested operation succeeds only if the 
supplied ETag matches the latest Service Provider Resource; e.g., If-Match: 
W/"e180ee84f0671b1"

Original issue reported on code.google.com by e...@wahlstromstekniska.se on 16 May 2012 at 12:16

GoogleCodeExporter commented 9 years ago
Don't require on DELETE. Change text to MUST if supported by server.

Original comment by e...@wahlstromstekniska.se on 16 May 2012 at 4:13

GoogleCodeExporter commented 9 years ago

Original comment by e...@wahlstromstekniska.se on 23 May 2012 at 3:05

GoogleCodeExporter commented 9 years ago
http://www.simplecloud.info/specs/draft-scim-api-00.html#etags

OLD:
Similarly, consumers MAY supply an If-Match ETag header for PUT, PATCH, and 
DELETE operations to ensure that the requested operation succeeds only if the 
supplied ETag matches the latest Service Provider Resource; e.g., If-Match: 
W/"e180ee84f0671b1"

NEW:
If the Service Providers supports etags the Consumer MUST supply an If-Match 
ETag header for PUT and PATCH operations to ensure that the requested operation 
succeeds only if the supplied ETag matches the latest Service Provider 
Resource; e.g., If-Match: W/"e180ee84f0671b1"

Original comment by e...@wahlstromstekniska.se on 30 May 2012 at 1:43

GoogleCodeExporter commented 9 years ago

Original comment by e...@wahlstromstekniska.se on 13 Jun 2012 at 9:41

GoogleCodeExporter commented 9 years ago
When trying to resolve issue #85 "If ETags is required, also send them when 
doing PUT and PATCH." I've read the section "3.11. Versioning Resources." a 
bunch of times and it feels like we need to move around the text a bit to make 
it more clear.

First of all there there are two different things. Support for caching and then 
it's performing some kind of concurrency control. Caching means, server returns 
etag and client sets it in an If-None-Match header. If it matches return a 304 
"Not Modified", otherwise the Resource. All is well. Concurrency control is, 
server returns etag and client sets it in an If-Match header. If it matches 
then preform the PUT/PATCH request otherwise return 412 "Precondition Failed". 
There are two different functions and two different headers to send for the 
consumer. The current text kinda mix them together so I suggest that we remove 
texts about concurrency control when we talk about If-None-Match.

Then we have the, for me, dreaded "If-Match: *" string that gives the consumer 
full power to ignore the service providers strive for order and version 
handling :) Lets remove that sentence making the service provider decide if it 
should honor it or not. The HTTP specification says that the server SHOULD use 
it. 

So... I removed talk about concurrency handling when talking about 
if-none-match. I have also removed the "If-Match: *" text so that the service 
provider can choose if he want's to dishonor a "If-Match: *" and also forced 
the the consumer to use "If-Match: entity-tag" when doing PUT and PATCH. 

We could potentially emphasis that using week etags in any thing else but GET 
operations is against http spec but we still support it in the scim rest api. 
Thoughts about that?

Original comment by e...@wahlstromstekniska.se on 13 Jun 2012 at 2:51

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r200

Original comment by e...@wahlstromstekniska.se on 30 Jun 2012 at 11:15