Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: fix signature v2_auth headers

Anthony Rusdi899f2853191e
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index edbe3bb68..dbc6f72af 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -1925,6 +1925,10 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
return errors.Wrap(err, "s3 upload: sign request")
}
+ if o.fs.opt.V2Auth && headers == nil {
+ headers = putObj.HTTPRequest.Header
+ }
+
// Set request to nil if empty so as not to make chunked encoding
if size == 0 {
in = nil