mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws|storage|test] Replaced random ETag implementation with MD5, per S3 docs.
This commit is contained in:
parent
71aa9f9719
commit
a3245b3a84
2 changed files with 1 additions and 5 deletions
|
@ -131,10 +131,6 @@ module Fog
|
|||
"ip-#{ip_address.gsub('.','-')}.ec2.internal"
|
||||
end
|
||||
|
||||
def self.etag
|
||||
Fog::Mock.random_hex(32)
|
||||
end
|
||||
|
||||
def self.image
|
||||
path = []
|
||||
(rand(3) + 2).times do
|
||||
|
|
|
@ -66,7 +66,7 @@ module Fog
|
|||
object = {
|
||||
:body => data[:body],
|
||||
'Content-Type' => options['Content-Type'] || data[:headers]['Content-Type'],
|
||||
'ETag' => Fog::AWS::Mock.etag,
|
||||
'ETag' => Digest::MD5.hexdigest(data[:body]),
|
||||
'Key' => object_name,
|
||||
'Last-Modified' => Fog::Time.now.to_date_header,
|
||||
'Content-Length' => options['Content-Length'] || data[:headers]['Content-Length'],
|
||||
|
|
Loading…
Reference in a new issue