{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaCloud/AWSCore.jl/issues/48","repository_url":"https://api.github.com/repos/JuliaCloud/AWSCore.jl","labels_url":"https://api.github.com/repos/JuliaCloud/AWSCore.jl/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/JuliaCloud/AWSCore.jl/issues/48/comments","events_url":"https://api.github.com/repos/JuliaCloud/AWSCore.jl/issues/48/events","html_url":"https://github.com/JuliaCloud/AWSCore.jl/issues/48","id":366095276,"node_id":"MDU6SXNzdWUzNjYwOTUyNzY=","number":48,"title":"The provided 'x-amz-content-sha256' header does not match what was computed","user":{"login":"jingpengw","id":7651573,"node_id":"MDQ6VXNlcjc2NTE1NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/7651573?v=4","gravatar_id":"","url":"https://api.github.com/users/jingpengw","html_url":"https://github.com/jingpengw","followers_url":"https://api.github.com/users/jingpengw/followers","following_url":"https://api.github.com/users/jingpengw/following{/other_user}","gists_url":"https://api.github.com/users/jingpengw/gists{/gist_id}","starred_url":"https://api.github.com/users/jingpengw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingpengw/subscriptions","organizations_url":"https://api.github.com/users/jingpengw/orgs","repos_url":"https://api.github.com/users/jingpengw/repos","events_url":"https://api.github.com/users/jingpengw/events{/privacy}","received_events_url":"https://api.github.com/users/jingpengw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-02T21:54:56Z","updated_at":"2018-10-03T00:39:06Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I got an error with putting object to S3, any ideas why does this happen?\r\na google search indicates that this is an error with \"Content-Length\" header. I tried to set this header, but still got the same error.\r\n\r\n```\r\nERROR: XAmzContentSHA256Mismatch -- The provided 'x-amz-content-sha256' header does not match what was\r\n computed.                                                                                            \r\nHTTP.ExceptionRequest.StatusError(400, HTTP.Messages.Response:                                        \r\n\"\"\"                                                                                                   \r\nHTTP/1.1 400 Bad Request                                                                              \r\nx-amz-request-id: 0AA8879080750357                                                                    \r\nx-amz-id-2: 2sRfJ1BJoh2qxm9U4jUFMq9DlcRNaZCZD3H2hVCrzBzdmKhkaLNY4njRdbMAx03189CMt9Na81w=              \r\nContent-Type: application/xml                                                                         \r\nTransfer-Encoding: chunked                                                                            \r\nDate: Tue, 02 Oct 2018 21:50:51 GMT                                                                   \r\nConnection: close                                                                                     \r\nServer: AmazonS3                                                                                      \r\n                                                                                                      \r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>                                                                \r\n<Error><Code>XAmzContentSHA256Mismatch</Code><Message>The provided 'x-amz-content-sha256' header does \r\nnot match what was computed.</Message><ClientComputedContentSHA256>7f08f6ff9d11494a990bed7efb105e97259\r\na35f1f7ed72d9fb83cec44a62e467</ClientComputedContentSHA256><S3ComputedContentSHA256>47e0eabb9907757cfe\r\n1da1c6ea284f8ec52589e3f9243cff9850a0eb9cc511aa</S3ComputedContentSHA256><RequestId>0AA8879080750357</R\r\nequestId><HostId>2sRfJ1BJoh2qxm9U4jUFMq9DlcRNaZCZD3H2hVCrzBzdmKhkaLNY4njRdbMAx03189CMt9Na81w=</HostId>\r\n</Error>\"\"\")                                                                                          \r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaCloud/AWSCore.jl/issues/comments/426475896","html_url":"https://github.com/JuliaCloud/AWSCore.jl/issues/48#issuecomment-426475896","issue_url":"https://api.github.com/repos/JuliaCloud/AWSCore.jl/issues/48","id":426475896,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjQ3NTg5Ng==","user":{"login":"jingpengw","id":7651573,"node_id":"MDQ6VXNlcjc2NTE1NzM=","avatar_url":"https://avatars1.githubusercontent.com/u/7651573?v=4","gravatar_id":"","url":"https://api.github.com/users/jingpengw","html_url":"https://github.com/jingpengw","followers_url":"https://api.github.com/users/jingpengw/followers","following_url":"https://api.github.com/users/jingpengw/following{/other_user}","gists_url":"https://api.github.com/users/jingpengw/gists{/gist_id}","starred_url":"https://api.github.com/users/jingpengw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingpengw/subscriptions","organizations_url":"https://api.github.com/users/jingpengw/orgs","repos_url":"https://api.github.com/users/jingpengw/repos","events_url":"https://api.github.com/users/jingpengw/events{/privacy}","received_events_url":"https://api.github.com/users/jingpengw/received_events","type":"User","site_admin":false},"created_at":"2018-10-03T00:39:06Z","updated_at":"2018-10-03T00:39:06Z","author_association":"CONTRIBUTOR","body":"here is the code example\r\n```julia\r\nusing AWSCore\r\nusing AWSSDK\r\n\r\narguments = Dict{String,Any}(\"Body\"=>UInt8[0xc2, 0x9f, 0x52, 0x2b, 0x44, 0x38, 0x07, 0x23, 0xe9, 0x1e, 0x32, 0x32, 0x49, 0xa0, 0xbc, 0xe7, 0xce, 0x23, 0xfd, 0x39, 0x36, 0x87, 0x55, 0xc2, 0x70, 0x2b, 0x27, 0xfc, 0x3f, 0x93, 0x4b, 0xc9, 0xa3, 0x8c, 0xd0, 0xcd, 0x79, 0x95, 0x2a, 0x29, 0xac, 0x9f, 0x52, 0xe2, 0x8f],\"Bucket\"=>\"mybucket\",\"Key\"=>\"mykey\")\r\n\r\naws = aws_config()\r\nS3.put_object(aws; arguments = arguments)\r\nS3.list_objects(aws; arguments=arguments)\r\n```\r\nThe two requests have similar invalid bucket name errors. \r\n```\r\nERROR: InvalidBucketName -- The specified bucket is not valid.\r\nHTTP.ExceptionRequest.StatusError(400, HTTP.Messages.Response:\r\n\"\"\"\r\nHTTP/1.1 400 Bad Request\r\nx-amz-request-id: F1C17C6CF30FAB11\r\nx-amz-id-2: /Ft8GGs2Cw9vSAfSiRB3qd16fznxijDU07aUlB7sHAAjDtDAodGpNwHX3aaZZnxCC+omjheX9WA=\r\nContent-Type: application/xml\r\nTransfer-Encoding: chunked\r\nDate: Wed, 03 Oct 2018 00:38:05 GMT\r\nConnection: close\r\nServer: AmazonS3\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Error><Code>InvalidBucketName</Code><Message>The specified bucket is not valid.</Message><BucketName>{Bucket}</BucketName><RequestId>F1C17C6CF30FAB11</RequestId><HostId>/Ft8GGs2Cw9vSAfSiRB3qd16fznxijDU07aUlB7sHAAjDtDAodGpNwHX3aaZZnxCC+omjheX9WA=</HostId></Error>\"\"\")\r\n\r\nStacktrace:\r\n [1] #request#1 at /usr/people/jingpeng/.julia/packages/HTTP/YjRCz/src/ExceptionRequest.jl:22 [inlined]                                                                            \r\n [2] #request at ./none:0 [inlined]\r\n [3] #request#1(::VersionNumber, ::String, ::Nothing, ::Nothing, ::Base.Iterators.Pairs{Symbol,Integer,Tuple{Symbol,Symbol},NamedTuple{(:verbose, :require_ssl_verification),Tuple{Int64,Bool}}}, ::Function, ::Type{HTTP.MessageRequest.MessageLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String) at /usr/people/jingpeng/.julia/packages/HTTP/YjRCz/src/MessageRequest.jl:47           \r\n [4] (::getfield(HTTP, Symbol(\"#kw##request\")))(::NamedTuple{(:verbose, :require_ssl_verification),Tuple{Int64,Bool}}, ::typeof(HTTP.request), ::Type{HTTP.MessageRequest.MessageLayer{HTTP.ExceptionRequest.ExceptionLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String) at ./none:0\r\n [5] http_request(::Dict{Symbol,Any}) at /usr/people/jingpeng/.julia/packages/AWSCore/LkyzG/src/http.jl:36                                                                         \r\n [6] macro expansion at /usr/people/jingpeng/.julia/packages/AWSCore/LkyzG/src/AWSCore.jl:413 [inlined]                                                                            \r\n [7] macro expansion at /usr/people/jingpeng/.julia/packages/Retry/Fy9mw/src/repeat_try.jl:192 [inlined]                                                                           \r\n [8] do_request(::Dict{Symbol,Any}) at /usr/people/jingpeng/.julia/packages/AWSCore/LkyzG/src/AWSCore.jl:391                                                                       \r\n [9] #service_rest_xml#10(::Base.Iterators.Pairs{Symbol,Any,NTuple{5,Symbol},NamedTuple{(:service, :version, :verb, :resource, :args),Tuple{String,String,String,String,Base.Iterators.Pairs{Symbol,Dict{String,Any},Tuple{Symbol},NamedTuple{(:arguments,),Tuple{Dict{String,Any}}}}}}}, ::Function, ::Dict{Symbol,Any}) at /usr/people/jingpeng/.julia/packages/AWSCore/LkyzG/src/AWSCore.jl:339\r\n [10] #service_rest_xml at ./none:0 [inlined]\r\n [11] s3 at /usr/people/jingpeng/.julia/packages/AWSCore/LkyzG/src/Services.jl:1460 [inlined]                                                                                      \r\n [12] put_object at /usr/people/jingpeng/.julia/packages/AWSSDK/dAby7/src/S3.jl:5136 [inlined]                                                                                     \r\n [13] #put_object#72 at /usr/people/jingpeng/.julia/packages/AWSSDK/dAby7/src/S3.jl:5134 [inlined]                                                                                 \r\n [14] (::getfield(AWSSDK.S3, Symbol(\"#kw##put_object\")))(::NamedTuple{(:arguments,),Tuple{Dict{String,Any}}}, ::typeof(AWSSDK.S3.put_object), ::Dict{Symbol,Any}) at ./none:0      \r\n [15] top-level scope at none:0\r\n```\r\n\r\nMy bucket name already exist and are all alphabet. It should be valid. I have tried a few other bucket names, they all report the same error."}}
{"actor":{"display_login":"jingpengw"}}