- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for BadDigest (0.07 sec)
-
internal/hash/errors.go
return "Bad sha256: Expected " + e.ExpectedSHA256 + " does not match calculated " + e.CalculatedSHA256 } // BadDigest - Content-MD5 you specified did not match what we received. type BadDigest struct { ExpectedMD5 string CalculatedMD5 string } func (e BadDigest) Error() string { return "Bad digest: Expected " + e.ExpectedMD5 + " does not match calculated " + e.CalculatedMD5 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon May 15 21:08:54 UTC 2023 - 2.4K bytes - Viewed (0) -
internal/hash/reader.go
func newReader(ctx context.Context, src io.Reader, size int64, md5Hex, sha256Hex string, actualSize int64, disableMD5 bool, forceMD5 []byte) (*Reader, error) { MD5, err := hex.DecodeString(md5Hex) if err != nil { return nil, BadDigest{ // TODO(aead): Return an error that indicates that an invalid ETag has been specified ExpectedMD5: md5Hex, CalculatedMD5: "", } } SHA256, err := hex.DecodeString(sha256Hex) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 19 12:59:07 UTC 2024 - 10.9K bytes - Viewed (0) -
cmd/object-api-putobject_test.go
expectedError: hash.BadDigest{ExpectedMD5: invalidMD5, CalculatedMD5: getMD5Hash(data)}, }, 24: { bucketName: bucket, objName: object, inputData: nilBytes, inputMeta: invalidMD5Header, inputDataSize: int64(len(nilBytes)), expectedMd5: getMD5Hash(nilBytes), expectedError: hash.BadDigest{ExpectedMD5: invalidMD5, CalculatedMD5: getMD5Hash(nilBytes)}, }, 25: {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 25.8K bytes - Viewed (0) -
internal/hash/reader_test.go
actualSize: 4, }, { desc: "Failure md5 mismatch.", src: bytes.NewReader([]byte("abcd")), size: 4, actualSize: 4, md5hex: "d41d8cd98f00b204e9800998ecf8427f", err: BadDigest{ "d41d8cd98f00b204e9800998ecf8427f", "e2fc714c4727ee9395f324cd2e7f331f", }, }, { desc: "Failure sha256 mismatch.", src: bytes.NewReader([]byte("abcd")), size: 4,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 18 17:00:54 UTC 2023 - 10.3K bytes - Viewed (0) -
cmd/api-errors_test.go
"errors" "testing" "github.com/minio/minio/internal/crypto" "github.com/minio/minio/internal/hash" ) var toAPIErrorTests = []struct { err error errCode APIErrorCode }{ {err: hash.BadDigest{}, errCode: ErrBadDigest}, {err: hash.SHA256Mismatch{}, errCode: ErrContentSHA256Mismatch}, {err: IncompleteBody{}, errCode: ErrIncompleteBody}, {err: ObjectExistsAsDirectory{}, errCode: ErrObjectExistsAsDirectory},
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 25 15:13:08 UTC 2023 - 3.4K bytes - Viewed (0) -
cmd/object-api-multipart_test.go
// Test case - 12. // Input to replicate Md5 mismatch. { bucketName: bucket, objName: object, uploadID: uploadID, PartID: 1, inputMd5: "d41d8cd98f00b204e9800998ecf8427f", expectedError: hash.BadDigest{ExpectedMD5: "d41d8cd98f00b204e9800998ecf8427f", CalculatedMD5: "d41d8cd98f00b204e9800998ecf8427e"}, }, // Test case - 13. // When incorrect sha256 is provided. {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 09:42:21 UTC 2024 - 88.8K bytes - Viewed (0) -
cmd/api-errors.go
}, ErrAccessDenied: { Code: "AccessDenied", Description: "Access Denied.", HTTPStatusCode: http.StatusForbidden, }, ErrBadDigest: { Code: "BadDigest", Description: "The Content-Md5 you specified did not match what we received.", HTTPStatusCode: http.StatusBadRequest, }, ErrEntityTooSmall: { Code: "EntityTooSmall",
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 92.1K bytes - Viewed (0)