net
net copied to clipboard
webdav: release locks when deleting
The WebDAV RFC indicates that locks rooted on deleted resource MUST be destroyed. The WebDAV server does not do this with the builtin in-memory lock system (memLS). This commit adds a new interface, implemented by memLS, which allows for deleting locks rooted at a given resource.
We added a new interface rather than extending or changing the existing one to avoid breaking backwards compatibility with other implementations of the LockSystem interface. The WebDAV server will behave as it used to if using a LockSystem which has not implemented the new interface.
We apply the same operation for moved files. This follows from the WebDAV RFC which indicates that a move is logically a copy followed by consitency checks, followed by a delete of the source.
Fixes golang/go#42839
This PR (HEAD: b9cf9e4a6b2910624360f5b29ca9d439d1fc38fd) has been imported to Gerrit for code review.
Please visit https://go-review.googlesource.com/c/net/+/285753 to see it.
Tip: You can toggle comments from me using the comments
slash command (e.g. /comments off
)
See the Wiki page for more info