internal: add PROPPATCH support to server

This commit is contained in:
Simon Ser
2020-01-21 23:18:27 +01:00
parent 4cee748898
commit 90fe8dedf7
4 changed files with 46 additions and 0 deletions

View File

@@ -185,6 +185,11 @@ func (b *backend) propfindFile(propfind *internal.Propfind, fi *FileInfo) (*inte
return internal.NewPropfindResponse(fi.Href, propfind, props)
}
func (b *backend) Proppatch(r *http.Request, update *internal.Propertyupdate) (*internal.Response, error) {
// TODO: return a failed Response instead
return nil, internal.HTTPErrorf(http.StatusForbidden, "webdav: PROPPATCH is unsupported")
}
func (b *backend) Put(r *http.Request) error {
wc, err := b.FileSystem.Create(r.URL.Path)
if err != nil {