findify / s3mock

Embedded S3 server for easy mocking
MIT License
387 stars 107 forks source link

check x-amz-content-sha256 header to determine if request is chunked #115

Closed tstapleton closed 3 years ago

tstapleton commented 6 years ago

I was calling putObject with small objects in the aws-sdk-js. The requests received by s3mock were not chunked, but since the authentication header was passed, it was trying to read the request as chunked. now, it checks the x-amz-content-sha256 header to determine if the request payload is transferred in a single chunk or multiple chunks. See the documentation at https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html.

cc: @luis-almeida-santos

tonicebrian commented 6 years ago

Ups I didn't checked all the active PR and I solved same problem with a different approach in #124 . Hopefully one of the two will be merged