AWS S3 requires Content-MD5 for PutObject with Object Lock parameters. Since rclone passes a non-seekable io.Reader, the SDK cannot compute checksums automatically. Buffer the body and compute MD5 manually for singlepart PutObject and presigned request uploads when Object Lock parameters are set. Multipart uploads are unaffected as Object Lock headers go on CreateMultipartUpload which has no body. Add object_lock_supported provider quirk (default true) to allow skipping Object Lock integration tests on providers with incomplete S3 API support. Set to false for GCS which uses non-standard x-goog-bypass-governance-retention header and doesn't implement PutObjectLegalHold/GetObjectLegalHold. Add Multipart and Presigned subtests to Object Lock integration tests to cover all three upload paths. Fixes #9199
25 lines
1004 B
YAML
25 lines
1004 B
YAML
name: GCS
|
|
description: Google Cloud Storage
|
|
region: {}
|
|
endpoint:
|
|
https://storage.googleapis.com: Google Cloud Storage endpoint
|
|
location_constraint: {}
|
|
acl: {}
|
|
bucket_acl: true
|
|
quirks:
|
|
# Google break request Signature by mutating accept-encoding HTTP header
|
|
# https://github.com/rclone/rclone/issues/6670
|
|
use_accept_encoding_gzip: false
|
|
sign_accept_encoding: false
|
|
use_already_exists: true # returns BucketNameUnavailable instead of BucketAlreadyExists but good enough!
|
|
# GCS doesn't like the x-id URL parameter the SDKv2 inserts
|
|
use_x_id: false
|
|
# GCS S3 doesn't support multi-part server side copy:
|
|
# See: https://issuetracker.google.com/issues/323465186
|
|
# So make cutoff very large which it does seem to support
|
|
copy_cutoff: 9223372036854775807
|
|
# GCS S3 API doesn't fully support Object Lock:
|
|
# - Uses x-goog-bypass-governance-retention instead of x-amz-bypass-governance-retention
|
|
# - PutObjectLegalHold / GetObjectLegalHold not implemented
|
|
object_lock_supported: false
|