mirror of
https://github.com/minio/minio.git
synced 2025-01-12 23:43:22 -05:00
tar: Avoid storing snowball extraction header in extract objects (#17389)
This commit is contained in:
parent
6f2406b0b6
commit
0f0dcf0c5e
@ -2106,7 +2106,19 @@ func (api objectAPIHandlers) PutObjectExtractHandler(w http.ResponseWriter, r *h
|
|||||||
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove the snowball headers from metadata from objects
|
||||||
|
// since those are actionable headers and not for storage
|
||||||
|
delete(metadata, xhttp.AmzSnowballExtract)
|
||||||
|
delete(metadata, xhttp.AmzSnowballExtract)
|
||||||
|
delete(metadata, xhttp.MinIOSnowballIgnoreDirs)
|
||||||
|
delete(metadata, xhttp.MinIOSnowballIgnoreErrors)
|
||||||
|
delete(metadata, xhttp.MinIOSnowballPrefix)
|
||||||
|
|
||||||
|
// Use the same storage class as the original uploaded tar file
|
||||||
|
if sc != "" {
|
||||||
metadata[xhttp.AmzStorageClass] = sc
|
metadata[xhttp.AmzStorageClass] = sc
|
||||||
|
}
|
||||||
|
|
||||||
putObjectTar := func(reader io.Reader, info os.FileInfo, object string) error {
|
putObjectTar := func(reader io.Reader, info os.FileInfo, object string) error {
|
||||||
size := info.Size()
|
size := info.Size()
|
||||||
|
@ -89,8 +89,9 @@ const (
|
|||||||
AmzObjectLockLegalHold = "X-Amz-Object-Lock-Legal-Hold"
|
AmzObjectLockLegalHold = "X-Amz-Object-Lock-Legal-Hold"
|
||||||
AmzObjectLockBypassGovernance = "X-Amz-Bypass-Governance-Retention"
|
AmzObjectLockBypassGovernance = "X-Amz-Bypass-Governance-Retention"
|
||||||
AmzBucketReplicationStatus = "X-Amz-Replication-Status"
|
AmzBucketReplicationStatus = "X-Amz-Replication-Status"
|
||||||
AmzSnowballExtract = "X-Amz-Meta-Snowball-Auto-Extract"
|
|
||||||
|
|
||||||
|
// AmzSnowballExtract will trigger unpacking of an archive content
|
||||||
|
AmzSnowballExtract = "X-Amz-Meta-Snowball-Auto-Extract"
|
||||||
// MinIOSnowballIgnoreDirs will skip creating empty directory objects.
|
// MinIOSnowballIgnoreDirs will skip creating empty directory objects.
|
||||||
MinIOSnowballIgnoreDirs = "X-Amz-Meta-Minio-Snowball-Ignore-Dirs"
|
MinIOSnowballIgnoreDirs = "X-Amz-Meta-Minio-Snowball-Ignore-Dirs"
|
||||||
// MinIOSnowballIgnoreErrors will ignore recoverable errors, typically single files failing to upload.
|
// MinIOSnowballIgnoreErrors will ignore recoverable errors, typically single files failing to upload.
|
||||||
|
Loading…
Reference in New Issue
Block a user