signature-v4: Use sha256("") for calculating canonical request (#4064)

This commit is contained in:
Krishna Srinivas
2017-04-10 09:58:08 -07:00
committed by Harshavardhana
parent b927523223
commit a4209c10ea
9 changed files with 123 additions and 67 deletions

View File

@@ -398,12 +398,11 @@ func (s *TestSuiteCommon) TestListenBucketNotificationHandler(c *C) {
c.Assert(err, IsNil)
verifyError(c, response, "InvalidArgument", "Size of filter rule value cannot exceed 1024 bytes in UTF-8 representation", http.StatusBadRequest)
req, err = newTestSignedRequest("GET",
req, err = newTestSignedBadSHARequest("GET",
getListenBucketNotificationURL(s.endPoint, bucketName, []string{}, []string{}, validEvents),
0, nil, s.accessKey, s.secretKey, s.signer)
c.Assert(err, IsNil)
req.Header.Set("x-amz-content-sha256", "somethingElse")
client = http.Client{Transport: s.transport}
// execute the request.
response, err = client.Do(req)