lua-resty-aws icon indicating copy to clipboard operation
lua-resty-aws copied to clipboard

The provided 'x-amz-content-sha256' header does not match what was computed.

Open xposix opened this issue 9 years ago • 3 comments

I must be doing something wrong. It works fine when the file I'm uploading is empty but it returns this when I upload a non-empty file. Do you know what am I doing wrong? Thanks.

(...)

< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 400 Bad Request
< Server: openresty/1.9.7.3
< Date: Sat, 13 Feb 2016 01:23:08 GMT
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Connection: keep-alive
< x-amz-request-id: D5BE775ED50BEBFE
< x-amz-id-2: Mnd80K6ASh5UMkG9Zi/38nn6zGwl4AW834aVeNCbvzbGE603SfdjOcxhZjpQua/5oP3BDOVFGHg=
<
<?xml version="1.0" encoding="UTF-8"?>
* Connection #0 to host localhost left intact
<Error><Code>XAmzContentSHA256Mismatch</Code><Message>The provided 'x-amz-content-sha256' header does not match what was computed.</Message><ClientComputedContentSHA256>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</ClientComputedContentSHA256><S3ComputedContentSHA256>cbb11b06446575cbbed8bac98b3b23abfcb053c3ce9414d95eaf6d0c4dfc4bd6</S3ComputedContentSHA256><RequestId>D5BE775ED50BEBFE</RequestId><HostId>Mnd80K6ASh5UMkG9Zi/38nn6zGwl4AW834aVeNCbvzbGE603SfdjOcxhZjpQua/5oP3BDOVFGHg=</HostId></Error>

xposix avatar Feb 13 '16 01:02 xposix

My bucket is on the eu-west-1 (Ireland) region, and the command I'm using to test is: curl -4 -v -T /tmp/test.tst http://localhost:8081/rubenstest/test

... in case that helps.

xposix avatar Feb 13 '16 01:02 xposix

Sorry, I remember getting this error at one point but I don't remember what cause or solution for it was in my case.

grosskur avatar Feb 18 '16 09:02 grosskur

facing same for me.

bcherukuri avatar May 24 '18 20:05 bcherukuri