go fmt
This commit is contained in:
@@ -48,7 +48,7 @@ func (iam *IdentityAccessManagement) reqSignatureV4Verify(r *http.Request) (*Ide
|
||||
const (
|
||||
emptySHA256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
streamingContentSHA256 = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD"
|
||||
signV4ChunkedAlgorithm = "AWS4-HMAC-SHA256-PAYLOAD"
|
||||
signV4ChunkedAlgorithm = "AWS4-HMAC-SHA256-PAYLOAD"
|
||||
|
||||
// http Header "x-amz-content-sha256" == "UNSIGNED-PAYLOAD" indicates that the
|
||||
// client did not calculate sha256 of the payload.
|
||||
|
||||
@@ -54,7 +54,6 @@ func TestIsRequestPresignedSignatureV4(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Tests is requested authenticated function, tests replies for s3 errors.
|
||||
func TestIsReqAuthenticated(t *testing.T) {
|
||||
iam := NewIdentityAccessManagement("", "")
|
||||
|
||||
@@ -26,7 +26,7 @@ func isRequestSignatureV4(r *http.Request) bool {
|
||||
// Verify if request has AWS Signature Version '2'.
|
||||
func isRequestSignatureV2(r *http.Request) bool {
|
||||
return !strings.HasPrefix(r.Header.Get("Authorization"), signV4Algorithm) &&
|
||||
strings.HasPrefix(r.Header.Get("Authorization"), signV2Algorithm)
|
||||
strings.HasPrefix(r.Header.Get("Authorization"), signV2Algorithm)
|
||||
}
|
||||
|
||||
// Verify if request has AWS PreSign Version '4'.
|
||||
|
||||
Reference in New Issue
Block a user