Permalink
Browse files

[aws|storage] make head_object idempotent

  • Loading branch information...
1 parent d9926ea commit 1886bde528f900e4a873ab8e156676b474ee11fd @geemus geemus committed Feb 15, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 lib/fog/aws/requests/storage/head_object.rb
@@ -43,12 +43,13 @@ def head_object(bucket_name, object_name, options={})
headers['If-Unmodified-Since'] = Fog::Time.at(options['If-Unmodified-Since'].to_i).to_date_header if options['If-Modified-Since']
headers.merge!(options)
request({
- :expects => 200,
- :headers => headers,
- :host => "#{bucket_name}.#{@host}",
- :method => 'HEAD',
- :path => CGI.escape(object_name),
- :query => query
+ :expects => 200,
+ :headers => headers,
+ :host => "#{bucket_name}.#{@host}",
+ :idempotent => true,
+ :method => 'HEAD',
+ :path => CGI.escape(object_name),
+ :query => query
})
end

0 comments on commit 1886bde

Please sign in to comment.