...
Code Block |
---|
If-Match: "508941dc9b52243f64d964b058354b76" If-Match: "508941dc9b52243f64d964b058354b76", "fe3233d3c6881d5e8b654117b829d26c" If-Match: W/"508941dc9b52243f64d964b058354b76" If-Match: * |
If any of Swarm performs the requested method as if the If-Match header field did not exist if the entity tags match the primary UUID of the object that is returned in the response to a similar GET request (without the If-Match header) on that resource or if "*" is given, Swarm performs the requested method as if the . The If-Match header field did not exist. If will be ignored if the request results in anything other than a 2xx status without the If-Match header field, the If-Match header will be ignored.
If none of the entity tags match, Swarm will not perform the requested method, and will instead return a 412 Precondition Failed response with a current ETag header if none of the entity tags match. This behavior is most useful when the client wants to prevent an updating method (such as PUT) from modifying an aliased object that changed since the client last retrieved it.
If Swarm will not return a response status of 412 Precondition Failed unless it is consistent with all of the conditional header fields in the request if Swarm receives a conditional request that includes both a Last-Modified date (for example, in an If-Modified-Since or If-Unmodified-Since header field) and one or more entity tags as cache validators (for example, in an If-Match header field), Swarm will not return a response status of 412 Precondition Failed unless it is consistent with all of the conditional header fields in the request.
If-None-Match
A Swarm client or proxy can include this header with the PUT, COPY, APPEND, GET, and HEAD methods to make it conditional. This feature allows efficient cached information updates with a minimum amount of transaction overhead. The header value is either a single quoted string (possibly with some ignored flags outside the quotation marks), a comma-separated list of quoted strings, or a single asterisk, anything after which will be ignored.
...
Swarm will not perform the requested method if any of the entity tags match the primary object UUID that is returned in the response to a similar GET request (without the If-None-Match header) on that object or if "*" is given and the object does exist. Swarm will respond with a 304 Not Modified response, including a current ETag header for the object if the request method was GET or HEAD. Swarm will respond with a response of 412 Precondition failed with the same current ETag as the GET or HEAD response for all other request methods. The object was modified if none of the previously recorded and supplied entity tags match. The requested method will proceed as if the If-None-Match header field did not exist.
...