symphony-enrico commented on code in PR #541:
URL: https://github.com/apache/directory-scimple/pull/541#discussion_r1524509240


##########
scim-core/src/main/java/org/apache/directory/scim/core/repository/Repository.java:
##########
@@ -69,14 +70,14 @@ public interface Repository<T extends ScimResource> {
    *
    *
    * @param id the identifier of the ScimResource to update and persist.
-   * @param version an optional version (usually used as an ETag) that can be 
used to optimize update requests, may be compared against, the current {@code 
ScimResource.meta.version}.
+   * @param etags optional ETag(s) in 'If-Match' header. If not null, to avoid 
dirty writing, {@code ScimResource.meta.version} must match one of this set 
(the set should contain only one element, and it must be not weak)

Review Comment:
   BTW I added into the comment the it must be not weak... this also because 
the eta is generated by scimple framework and it is generated as not weak in 
https://github.com/apache/directory-scimple/blob/a2e61a994187b09940bfa338248af66f987fd5aa/scim-server/src/main/java/org/apache/directory/scim/server/rest/EtagGenerator.java#L68
   
   However I double checked now and I see that all examples in RFC are weak and 
in: 
   https://datatracker.ietf.org/doc/html/rfc7644#section-3.14
   
   > The SCIM protocol supports resource versioning via standard HTTP
   >    ETags ([Section 2.3 of 
[RFC7232]](https://datatracker.ietf.org/doc/html/rfc7232#section-2.3)).  
Service providers MAY **support weak ETags**
   >    as the preferred mechanism for performing conditional
   >    retrievals and ensuring that clients do not inadvertently overwrite
   >    each other's changes, respectively
   
   However, it is strange use weak etag for versioning. Anyway one more reason 
to dont enforce and let implementation to decide
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org

Reply via email to