3.1.5.5 If Header Modification

A WebDAV Protocol: Microsoft Extensions-compliant server MAY<16> be noncompliant with [RFC2518] section 9.4, but MUST implement at least an alternative If header syntax that uses a ResourceTag as a State token. A WebDAV Protocol: Microsoft Extensions-compliant client communicating with a WebDAV Protocol: Microsoft Extensions-compliant server using a method such as PUT that makes use of an If header MUST limit the content of that If header in the following way:

Using the definitions specified in [RFC2518] section 9.4, the If header MUST contain a single no-tag-list consisting of a single list (that contains a single instance of the content), an optional "Not" followed by a State token, (that MUST be a Coded-URL containing an absolute-URI, which MUST be a ResourceTag). The modified ABNF definition specified in [RFC2518] for the If header is as follows.

 If = "If" ":" No-tag-list
 No-Tag-List = List
 List = "(" ["Not"] State-token ")"
 State-token = Coded-URL
 Coded-URL = "<" ResourceTag ">"
  
  

When an If header is included in a GET/HEAD/POST with "Not" specified, and the ResourceTag is incorrect, the behavior is to return a HTTP status code of Precondition Failed.  Without the "Not" specified, ignore the header.

When an If header is included in a PUT without "Not" specified, the behavior is the same as if there was an if-match with an Etag. With "Not" specified, the server will ignore the ResourceTag as long as it is valid and will fail this PUT request.<17>

The ResourceTag value is obtained from the ResourceTag header (section 2.2.4) returned in the result of a GET, HEAD, or POST request, or the Repl:resourcetag entity in the result body of a PROPFIND method for the specified resource.

Note If-Match or If-None-Match takes an ETag; If header takes a ResourceTag. An ETag is an opaque string which happens to contain a docid and a version. A ResourceTag is explicitly a GUID and a version.