From 705e4694ede983f0d7e813475a677e0b6bd2bf91 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 21 Nov 2019 11:06:20 +0000 Subject: [PATCH] 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 --- backend/webdav/webdav.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go index aedd6f70a..4a21ea05f 100644 --- a/backend/webdav/webdav.go +++ b/backend/webdav/webdav.go @@ -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