Skip to content

Commit

Permalink
only try to gsub etag on files if there is one (#722)
Browse files Browse the repository at this point in the history
closes #720
  • Loading branch information
geemus authored Aug 29, 2024
1 parent 4339e6d commit fddd974
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/fog/aws/models/storage/files.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ def new(attributes = {})
def normalize_headers(data)
data.headers['Last-Modified'] = Time.parse(fetch_and_delete_header(data, 'Last-Modified'))

etag = fetch_and_delete_header(data, 'ETag').gsub('"','')
data.headers['ETag'] = etag
if (etag = fetch_and_delete_header(data, 'ETag'))
data.headers['ETag'] = etag.gsub('"', '')
end

DASHED_HEADERS.each do |header|
value = fetch_and_delete_header(data, header)
Expand Down

0 comments on commit fddd974

Please sign in to comment.