Metadata header containing accents
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 283
- PR merge metrics
- No merged PRs in 30d
Description
Hello
Running the following code makes node receive a 403 response from S3 server. By just replacing the accented character on custom headers (á) by an ASCII char (a) gives a successful response (200). Am I doing something wrong?
```
var knox = require('knox');
var client = knox.createClient({
key: '***',
secret: '***',
bucket: '***'
});
client.putFile(
'./my-file.jpg',
'/my-hash',
{
'x-amz-acl': 'public-read',
'Content-Type': 'image/jpeg',
'x-amz-meta-accent-test': 'á'
},
function (err, res) {
console.log(res.statusCode);
console.log('Err', err);
res.on('data', function (data) {
console.log(data.toString());
})
});
```
**Response (ommiting real data):**
```
403
Err null
SignatureDoesNotMatchThe request signature we calculated does not match the signature you provided. Check your key and signing method.............PUT
image/jpeg
Wed, 02 Apr 2014 22:25:47 GMT
x-amz-acl:public-read
x-amz-meta-accent-test:á
/my-hash...
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the client.putFile example with the accented x-amz-meta-accent-test header and compare it with the ASCII version. Read the request-signing path and use the S3 response's StringToSign to trace the differing header bytes. Done means the accented metadata request is accepted with a matching signature and a 200 response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100