mirror of
https://github.com/rclone/rclone.git
synced 2025-01-05 13:59:25 +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
961dfe97b5
commit
3191717572
@ -5746,7 +5746,7 @@ func (o *Object) downloadFromURL(ctx context.Context, bucketPath string, options
|
|||||||
ContentEncoding: header("Content-Encoding"),
|
ContentEncoding: header("Content-Encoding"),
|
||||||
ContentLanguage: header("Content-Language"),
|
ContentLanguage: header("Content-Language"),
|
||||||
ContentType: header("Content-Type"),
|
ContentType: header("Content-Type"),
|
||||||
StorageClass: types.StorageClass(*header("X-Amz-Storage-Class")),
|
StorageClass: types.StorageClass(deref(header("X-Amz-Storage-Class"))),
|
||||||
}
|
}
|
||||||
o.setMetaData(&head)
|
o.setMetaData(&head)
|
||||||
return resp.Body, err
|
return resp.Body, err
|
||||||
|
Loading…
Reference in New Issue
Block a user