webdav
webdav copied to clipboard
Blocking open files for other users.
It is very important to block open files for other user's sessions. The SMB protocol works in a similar way. The WebDAV protocol also supports a mechanism for blocking open files. Is it possible to implement file locks or configure this lock via the config file?
#71 do you mean the lock/mutex?
i did not make too many changes to the code , the lock action behavior will only happen in file save/create...
your can see rfc4918
Although the write locks provide some help in preventing lost updates, they cannot guarantee that updates will never be lost. Consider the following scenario:
Two clients A and B are interested in editing the resource 'index.html'. Client A is an HTTP client rather than a WebDAV client, and so does not know how to perform locking.
Client A doesn't lock the document, but does a GET, and begins editing.
Client B does LOCK, performs a GET and begins editing.
Client B finishes editing, performs a PUT, then an UNLOCK.
Client A performs a PUT, overwriting and losing all of B's changes.