Prefix: "/_health/",
}
+ // Even though we don't accept LOCK requests, every webdav
+ // handler must have a non-nil LockSystem.
h.webdavLS = &noLockSystem{}
}
webdavMethod = map[string]bool{
"OPTIONS": true,
"PROPFIND": true,
- "LOCK": true,
- "UNLOCK": true,
}
fsMethod = map[string]bool{
"GET": true,
return
}
w.Header().Set("Access-Control-Allow-Headers", "Range")
- w.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS, PROPFIND, LOCK, UNLOCK")
+ w.Header().Set("Access-Control-Allow-Methods", "GET, POST, OPTIONS, PROPFIND")
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Max-Age", "86400")
statusCode = http.StatusOK
c.Check(resp.Code, check.Equals, http.StatusOK)
c.Check(resp.Body.String(), check.Equals, "")
c.Check(resp.Header().Get("Access-Control-Allow-Origin"), check.Equals, "*")
- c.Check(resp.Header().Get("Access-Control-Allow-Methods"), check.Equals, "GET, POST, OPTIONS, PROPFIND, LOCK, UNLOCK")
+ c.Check(resp.Header().Get("Access-Control-Allow-Methods"), check.Equals, "GET, POST, OPTIONS, PROPFIND")
c.Check(resp.Header().Get("Access-Control-Allow-Headers"), check.Equals, "Range")
// Check preflight for a disallowed request
// However, it does also permit impossible operations, like acquiring
// conflicting locks and releasing non-existent locks. This might
// confuse some clients if they try to probe for correctness.
+//
+// Currently this is a moot point: the LOCK and UNLOCK methods are not
+// accepted by keep-web, so it suffices to implement the
+// webdav.LockSystem interface.
type noLockSystem struct{}
func (*noLockSystem) Confirm(time.Time, string, string, ...webdav.Condition) (func(), error) {