drive: rewrite LOCK paths

Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
This commit is contained in:
Percy Wegmann
2024-05-14 20:30:02 -05:00
committed by Percy Wegmann
parent 87f00d76c4
commit 59848fe14b
6 changed files with 380 additions and 87 deletions

View File

@@ -151,6 +151,9 @@ func (s *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
return
}
// WebDAV's locking code compares the lock resources with the request's
// host header, set this to empty to avoid mismatches.
r.Host = ""
h.ServeHTTP(w, r)
}