Skip to content

Commit

Permalink
do not have headers with empty values (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Oct 20, 2022
1 parent 7aa4b0e commit 514b1fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api-compose-object.go
Expand Up @@ -221,7 +221,7 @@ func (c *Client) copyObjectDo(ctx context.Context, srcBucket, srcObject, destBuc
headers.Set(minIOBucketSourceETag, dstOpts.Internal.SourceETag)
}
if dstOpts.Internal.ReplicationRequest {
headers.Set(minIOBucketReplicationRequest, "")
headers.Set(minIOBucketReplicationRequest, "true")
}
if !dstOpts.Internal.LegalholdTimestamp.IsZero() {
headers.Set(minIOBucketReplicationObjectLegalHoldTimestamp, dstOpts.Internal.LegalholdTimestamp.Format(time.RFC3339Nano))
Expand Down
2 changes: 1 addition & 1 deletion api-put-object.go
Expand Up @@ -159,7 +159,7 @@ func (opts PutObjectOptions) Header() (header http.Header) {
header.Set(minIOBucketSourceETag, opts.Internal.SourceETag)
}
if opts.Internal.ReplicationRequest {
header.Set(minIOBucketReplicationRequest, "")
header.Set(minIOBucketReplicationRequest, "true")
}
if !opts.Internal.LegalholdTimestamp.IsZero() {
header.Set(minIOBucketReplicationObjectLegalHoldTimestamp, opts.Internal.LegalholdTimestamp.Format(time.RFC3339Nano))
Expand Down
2 changes: 1 addition & 1 deletion api-remove.go
Expand Up @@ -166,7 +166,7 @@ func (c *Client) removeObject(ctx context.Context, bucketName, objectName string
headers.Set(amzBucketReplicationStatus, string(opts.Internal.ReplicationStatus))
}
if opts.Internal.ReplicationRequest {
headers.Set(minIOBucketReplicationRequest, "")
headers.Set(minIOBucketReplicationRequest, "true")
}
if opts.ForceDelete {
headers.Set(minIOForceDelete, "true")
Expand Down

0 comments on commit 514b1fa

Please sign in to comment.