3.2.5.2 Adding Lock Headers to Existing Commands

The WebDAV server MUST honor lock headers that are sent on GET, POST, and PUT requests that are sent by using the Translate: F header if it advertises this functionality with X-MSDAVEXT: 1 in its OPTIONS response. It MAY honor these headers on requests that are not sent with Translate: F or on other methods. It SHOULD NOT send or honor these headers if it does not advertise this functionality with the X-MSDAVEXT: 1 OPTIONS response header.<21>

The following table provides the complete set of valid combinations that MAY be used for the WebDAV Protocol: Client Extensions. In the table, a value of Y indicates the presence of the extension while a value of N indicates omission of the extension. Any combination that is not included in this table MUST be processed as an HTTP 400 Bad Request error, as specified in [RFC2616] section 10.4.1.<22>

 HTTP verb

 Lock-token

 Lock-time-out

 Result

GET, HEAD or POST

Y

N

The header SHOULD be ignored.

GET, HEAD or POST

Y

Y

SHOULD fail the request if the token does not match.

MUST fail the request if there is no existing lock that is associated with the specified token or if the file is locked by a different user.

MUST refresh the lock if a nonzero time-out is specified.

MUST unlock if timeout=0.

GET, HEAD or POST

N

Y

MUST fail the request if the file is already locked.

MUST fail the request if timeout=0.

MUST lock the file if no existing lock.

GET, HEAD or POST

N

N

MUST return the file without processing any locks.

PUT

Y

N

MUST process the PUT if the token matches.

SHOULD fail the request if the token does not match or the file is not locked.

PUT

Y

Y

SHOULD fail the request if the token does not match.

MUST fail the request if there is no existing lock that is associated with the specified token or the file is locked by a different user.

MUST refresh the lock if a nonzero time-out is specified.

MUST unlock if timeout=0.

PUT

N

Y

MUST fail the request if the file is already locked.

MUST fail the request if timeout=0.

MUST lock the file if no existing lock.

PUT

N

N

MUST process the PUT request, as specified in [RFC4918] section 9.7.