mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
Ensure that we use constants everywhere (#7845)
This allows for canonicalization of the strings throughout our code and provides a common space for all these constants to reside. This list is rather non-exhaustive but captures all the headers used in AWS S3 API operations
This commit is contained in:
@@ -34,6 +34,7 @@ import (
|
||||
"time"
|
||||
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
xhttp "github.com/minio/minio/cmd/http"
|
||||
"github.com/minio/minio/pkg/policy"
|
||||
)
|
||||
|
||||
@@ -1202,7 +1203,7 @@ func (s *TestSuiteCommon) TestPutObject(c *check) {
|
||||
c.Assert(err, nil)
|
||||
c.Assert(response.StatusCode, http.StatusOK)
|
||||
// The response Etag header should contain Md5sum of an empty string.
|
||||
c.Assert(response.Header.Get("Etag"), "\""+emptyETag+"\"")
|
||||
c.Assert(response.Header.Get(xhttp.ETag), "\""+emptyETag+"\"")
|
||||
}
|
||||
|
||||
// TestListBuckets - Make request for listing of all buckets.
|
||||
@@ -2728,5 +2729,5 @@ func (s *TestSuiteCommon) TestObjectMultipart(c *check) {
|
||||
parts = append(parts, part)
|
||||
}
|
||||
etag := getCompleteMultipartMD5(parts)
|
||||
c.Assert(canonicalizeETag(response.Header.Get("Etag")), etag)
|
||||
c.Assert(canonicalizeETag(response.Header.Get(xhttp.ETag)), etag)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user