mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
webdav: add PUT to allowed methods for regular files
This commit is contained in:
parent
9db481fa51
commit
69f88b075a
@ -59,7 +59,13 @@ func (b *backend) Options(r *http.Request) ([]string, error) {
|
|||||||
if fi.IsDir() {
|
if fi.IsDir() {
|
||||||
return []string{http.MethodOptions, "PROPFIND"}, nil
|
return []string{http.MethodOptions, "PROPFIND"}, nil
|
||||||
} else {
|
} else {
|
||||||
return []string{http.MethodOptions, http.MethodHead, http.MethodGet, "PROPFIND"}, nil
|
return []string{
|
||||||
|
http.MethodOptions,
|
||||||
|
http.MethodHead,
|
||||||
|
http.MethodGet,
|
||||||
|
http.MethodPut,
|
||||||
|
"PROPFIND",
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user