mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Jsonify all OS orchestration requests.
Updates the Orchestration request method so that *all* request bodies with JSON responses get converted to JSON. The previous code failed to convert some HTTP 2xx responses to JSON.
This commit is contained in:
parent
c0af5b9c3a
commit
1854e9a040
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
if response.status == 200 && !response.body.empty?
|
||||
if !response.body.empty? and response.get_header('Content-Type') =~ /application\/json/ then
|
||||
response.body = Fog::JSON.decode(response.body)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue