mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #1786 from ceraslabs/release_address
Gaurd error of parsing non-JSON response
This commit is contained in:
commit
8663e9079e
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue