TTLabs / EvaporateJS

Javascript library for browser to S3 multipart resumable uploads
1.82k stars 207 forks source link

Removed blacklist header from canonical calc #480

Open duckboy81 opened 2 years ago

duckboy81 commented 2 years ago

In building a backend system to recreate and verify client request before signing them, I noticed the AWS SDK for PHP have blacklist of headers for those it will not sign.

As such, I have removed the content-length header from AwsSignatureV4.prototype.canonicalHeaders function to align with AWS's signature process.

AWS-SDK reference: https://github.com/aws/aws-sdk-php/blob/6ef06165ef815358d3e60872b4c9f6c10deb3816/src/Signature/SignatureV4.php#L40-L74