CopyObject:Set Content-Type to application/octet-stream if it is not set (#6958)

This commit is contained in:
kannappanr 2018-12-19 14:31:45 -08:00 committed by GitHub
parent d2f8f8c7ee
commit 7881791a91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,6 +134,11 @@ func extractMetadata(ctx context.Context, r *http.Request) (metadata map[string]
return nil, err
}
// Set content-type to default value if it is not set.
if _, ok := metadata["content-type"]; !ok {
metadata["content-type"] = "application/octet-stream"
}
// Success.
return metadata, nil
}