-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: V4.0_OS
-
Fix Version/s: V4.0_ERRATA01
-
Component/s: Protocol
-
Labels:None
-
Environment:
[Applied]
-
Proposal:
Section 8.2.4, Header If-Match, states the following:
"If an entity set is annotated with the term Core.OptimisticConcurrency (see [OData-VocCore]) and the client does not specify an If-Match request header in a Data Modification Request or Action Request, the service MUST respond with a 428 Precondition Required and MUST ensure that no observable change occurs as a result of the request."
This is true for data modification requests, but not generally true for action requests; an action request may operate on a single entity, a set of entities, or data unrelated to any entities. And, action requests may be invoked without having previously retrieved an entity from which to obtain an etag.
The most we can say is that an etag should be specified when invoking an action bound to a single entity for which an etag has been retrieved (i.e., an "advertised" action).
Also, it's always bugged me that we tie this to the OptimisticConcurrency annotation, as opposed to the presence of an etag in the response. The general rule should be: if you get an etag, provide it in an if-match header of any update/action on that entity.