Finish the Lock and Unlock feature for webdav.

This commit is contained in:
lishuang
2020-05-06 01:10:17 +08:00
parent ed0aa017db
commit 76c763b84d
5 changed files with 200 additions and 31 deletions

View File

@ -65,6 +65,7 @@ func ReadLockInfo(r io.Reader) (li LockInfo, status int, err error) {
// We only support exclusive (non-shared) write locks. In practice, these are
// the only types of locks that seem to matter.
if li.Exclusive == nil || li.Shared != nil || li.Write == nil {
// we should support Shared lock.
return LockInfo{}, http.StatusNotImplemented, ErrUnsupportedLockInfo
}
return li, 0, nil