mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 09:04:52 +01:00
s3: fix crash when using --s3-download-url after migration to SDKv2
Before this change rclone was crashing when the download URL did not supply an X-Amz-Storage-Class header. This change allows the header to be missing. See: https://forum.rclone.org/t/sigsegv-on-ubuntu-24-04/48047
This commit is contained in:
parent
e7a0fd0f70
commit
1ca3f12672
@ -5829,7 +5829,7 @@ func (o *Object) downloadFromURL(ctx context.Context, bucketPath string, options
|
||||
ContentEncoding: header("Content-Encoding"),
|
||||
ContentLanguage: header("Content-Language"),
|
||||
ContentType: header("Content-Type"),
|
||||
StorageClass: types.StorageClass(*header("X-Amz-Storage-Class")),
|
||||
StorageClass: types.StorageClass(deref(header("X-Amz-Storage-Class"))),
|
||||
}
|
||||
o.setMetaData(&head)
|
||||
return resp.Body, err
|
||||
|
Loading…
Reference in New Issue
Block a user