Merge pull request #1786 from ceraslabs/release_address

Gaurd error of parsing non-JSON response
This commit is contained in:
Wesley Beary 2013-06-10 18:24:37 -07:00
commit 8663e9079e
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ module Fog
end
end
unless response.body.empty?
if !response.body.empty? and response.get_header('Content-Type') == 'application/json'
response.body = Fog::JSON.decode(response.body)
end