ex-aws / ex_aws_s3

165 stars 146 forks source link

Append x-amz-checksum headers when using hashing algorithm other than MD5 #244

Closed d3caf closed 6 months ago

d3caf commented 7 months ago

While it was possible to specify an alternate hashing algorithm to ex_aws_s3, the header wasn't correctly appended to the request and was instead appended as Content-<hash algo>. AWS looks to require either Content-MD5 or x-amz-checksum-<hash algo> so this implements that behavior.

I also added some unit tests around this. Open to suggestions as to how to improve them since I was a little unsure about modifying the application env during a test.

d3caf commented 7 months ago

Hey there @bernardd, would you be able to give this a look? Thanks :)

d3caf commented 6 months ago

Hi @bernardd, just wanted to check in on this! Let me know if there is anything you need on my end. Thanks!

bernardd commented 6 months ago

Hi @d3caf - sorry about taking so long to get to this. All looks good - thanks especially for the docs and tests :)

d3caf commented 5 months ago

@bernardd sorry to bug you, but do you have an idea of when a new release will be made including this? Trying to get an idea of when I can transition off of my forked version. Happy to help prepare a release as well, if you'd like!