go.mod: bump github.com/studio-b12/gowebdav
For https://github.com/studio-b12/gowebdav/pull/87 Fixes #20295 Change-Id: I8ae6ff6969c84fcd510f0e15e0487fbfe9f7c821 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
b3d0ebcca3
commit
6fdffd9e5e
@@ -522,7 +522,7 @@ func newSystem(t *testing.T) *system {
|
||||
}
|
||||
}()
|
||||
|
||||
client := gowebdav.NewAuthClient(fmt.Sprintf("http://%s", ln.Addr()), &noopAuthorizer{})
|
||||
client := gowebdav.NewClient(fmt.Sprintf("http://%s", ln.Addr()), "", "")
|
||||
client.SetTransport(&http.Transport{DisableKeepAlives: true})
|
||||
s := &system{
|
||||
t: t,
|
||||
@@ -772,36 +772,6 @@ func pathTo(remote, share, name string) string {
|
||||
return path.Join(domain, remote, share, name)
|
||||
}
|
||||
|
||||
// noopAuthorizer implements gowebdav.Authorizer. It does no actual
|
||||
// authorizing. We use it in place of gowebdav's built-in authorizer in order
|
||||
// to avoid a race condition in that authorizer.
|
||||
type noopAuthorizer struct{}
|
||||
|
||||
func (a *noopAuthorizer) NewAuthenticator(body io.Reader) (gowebdav.Authenticator, io.Reader) {
|
||||
return &noopAuthenticator{}, nil
|
||||
}
|
||||
|
||||
func (a *noopAuthorizer) AddAuthenticator(key string, fn gowebdav.AuthFactory) {
|
||||
}
|
||||
|
||||
type noopAuthenticator struct{}
|
||||
|
||||
func (a *noopAuthenticator) Authorize(c *http.Client, rq *http.Request, path string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *noopAuthenticator) Verify(c *http.Client, rs *http.Response, path string) (redo bool, err error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (a *noopAuthenticator) Clone() gowebdav.Authenticator {
|
||||
return &noopAuthenticator{}
|
||||
}
|
||||
|
||||
func (a *noopAuthenticator) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
const lockBody = `<?xml version="1.0" encoding="utf-8" ?>
|
||||
<D:lockinfo xmlns:D='DAV:'>
|
||||
<D:lockscope><D:exclusive/></D:lockscope>
|
||||
|
||||
Reference in New Issue
Block a user