diff --git a/api-put-object-streaming.go b/api-put-object-streaming.go index c2663b49b..3ff3b69ef 100644 --- a/api-put-object-streaming.go +++ b/api-put-object-streaming.go @@ -330,7 +330,6 @@ func (c *Client) putObjectMultipartStreamOptionalChecksum(ctx context.Context, b // Create checksums // CRC32C is ~50% faster on AMD64 @ 30GB/s - var crcBytes []byte customHeader := make(http.Header) crc := opts.AutoChecksum.Hasher() md5Hash := c.md5Hasher() @@ -377,7 +376,6 @@ func (c *Client) putObjectMultipartStreamOptionalChecksum(ctx context.Context, b crc.Write(buf[:length]) cSum := crc.Sum(nil) customHeader.Set(opts.AutoChecksum.KeyCapitalized(), base64.StdEncoding.EncodeToString(cSum)) - crcBytes = append(crcBytes, cSum...) } // Update progress reader appropriately to the latest offset diff --git a/utils_test.go b/utils_test.go index 6e4a0ddbb..f6bccfc3b 100644 --- a/utils_test.go +++ b/utils_test.go @@ -446,7 +446,7 @@ func TestFullObjectChecksum64(t *testing.T) { want := sum(b) var parts []ObjectPart for len(b) > 0 { - sz := len(b) / 2 + sz := rng.Intn(len(b) / 2) if len(b)-sz < 1024 { sz = len(b) }