webdav: fix case of "Bearer" in Authorization: header to agree with RFC

Before this change rclone used "Authorization: BEARER token".  However
according the the RFC this should be "Bearer"

https://tools.ietf.org/html/rfc6750#section-2.1

This changes it to "Authorization: Bearer token"

Fixes #3751 and interop with Salesforce Webdav server
This commit is contained in:
Nick Craig-Wood 2019-11-21 11:06:20 +00:00
parent 4fbc90d115
commit 705e4694ed

View file

@ -384,7 +384,7 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
// sets the BearerToken up
func (f *Fs) setBearerToken(token string) {
f.opt.BearerToken = token
f.srv.SetHeader("Authorization", "BEARER "+token)
f.srv.SetHeader("Authorization", "Bearer "+token)
}
// fetch the bearer token using the command