From 69f88b075acc5fb5f22169b11749b321944df72c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 21 Jan 2020 21:35:37 +0100 Subject: [PATCH] webdav: add PUT to allowed methods for regular files --- server.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index f2c08a9..c816542 100644 --- a/server.go +++ b/server.go @@ -59,7 +59,13 @@ func (b *backend) Options(r *http.Request) ([]string, error) { if fi.IsDir() { return []string{http.MethodOptions, "PROPFIND"}, nil } else { - return []string{http.MethodOptions, http.MethodHead, http.MethodGet, "PROPFIND"}, nil + return []string{ + http.MethodOptions, + http.MethodHead, + http.MethodGet, + http.MethodPut, + "PROPFIND", + }, nil } }