Closed wade-tattersall closed 5 years ago
I did manage to workaround this by manually specifying the Authorization header on the client (though I basically had to copy-paste the auth method of the BasicAuth struct):
cl := gowebdav.NewClient(WEBDAV_PROTOCOL + host + WEBDAV_ROOT, "ignore", "ignore")
a := user + ":" + password
auth := "Basic " + base64.StdEncoding.EncodeToString([]byte(a))
cl.SetHeader("Authorization", auth)
Thanks. The server was our institution's instance of Blackboard Learn.
Hi,
I've run into trouble using this library with a server that returns a Www-Authenticate header of "BASIC" instead of "Basic". This is allowed as per https://tools.ietf.org/html/rfc2617, but the check on Lines 46 and 48 of requests.go does a case-sensitive check against 'Digest' or 'Basic'.
Can this be changed to a case-insensitive match like
strings.Index(strings.ToLower(rs.Header.Get("Www-Authenticate")), "digest")
?Is there any workaround? I can't see any way to manually specify the authentication method.
Regards,
Wade