mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[AWS|Glacier] Use bytesize rather than length
This commit is contained in:
parent
0ce5681841
commit
50504903d5
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ module Fog
|
|||
path = "/#{account_id}/vaults/#{Fog::AWS.escape(vault_name)}/archives"
|
||||
|
||||
headers = {
|
||||
'Content-Length' => body.length.to_s,
|
||||
'Content-Length' => body.bytesize.to_s,
|
||||
'x-amz-content-sha256' => Digest::SHA256.hexdigest(body),
|
||||
'x-amz-sha256-tree-hash' => Fog::AWS::Glacier::TreeHash.digest(body)
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ module Fog
|
|||
path = "/#{account_id}/vaults/#{Fog::AWS.escape(vault_name)}/multipart-uploads/#{Fog::AWS.escape(upload_id)}"
|
||||
|
||||
headers = {
|
||||
'Content-Length' => body.length.to_s,
|
||||
'Content-Range' => "bytes #{offset}-#{offset+body.length-1}/*",
|
||||
'Content-Length' => body.bytesize.to_s,
|
||||
'Content-Range' => "bytes #{offset}-#{offset+body.bytesize-1}/*",
|
||||
'x-amz-content-sha256' => Digest::SHA256.hexdigest(body),
|
||||
'x-amz-sha256-tree-hash' => hash
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue