You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am testing to put an object to amazon s3. But get a 403 status code with reason
'The request signature we calculated does not match the signature you provided.
Check your key and signing method.'
The code is:
response = yield from aiohttp.put(url, data=open(pathfn, 'rb'), headers=headers)
logger.debug('response status is ' + str(response.status))
raw = yield from response.text()
logger.debug('response body is ' + str(raw))
The raw headers input is:
{
"User-Agent": "Boto/2.38.0 Python/3.4.0 Linux/3.13.0-46-generic",
"Content-Length": "1024",
"Date": "Thu, 27 Aug 2015 02:49:17 GMT",
"Authorization": "AWS [access_key]:[signature]"
}
But when test with requests. It returns 200 status code.
The code is:
response = requests.put(url, data=open(pathfn, 'rb'), headers=headers)
logger.debug('response status is ' + str(response.status_code))
logger.debug('response body is ' + str(response.text))
So does aiohttp inside will affect the header 'Authorization'?
The text was updated successfully, but these errors were encountered:
@popravich: Thanks.
As awss3's signature is related with Content-Type header.
I explicitly set the Content-Type header and calculate awss3's signature with it.
Then it returns 200 status code from awss3.
I am testing to put an object to amazon s3. But get a 403 status code with reason
'The request signature we calculated does not match the signature you provided.
Check your key and signing method.'
The code is:
The url is:
http://s3.amazonaws.com:80/bucket_name/key_name
The raw headers input is:
{
"User-Agent": "Boto/2.38.0 Python/3.4.0 Linux/3.13.0-46-generic",
"Content-Length": "1024",
"Date": "Thu, 27 Aug 2015 02:49:17 GMT",
"Authorization": "AWS [access_key]:[signature]"
}
But when test with requests. It returns 200 status code.
The code is:
So does aiohttp inside will affect the header 'Authorization'?
The text was updated successfully, but these errors were encountered: