Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions lib/rabbitmq/http/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,10 @@ def encode_uri_path_segment(segment)
end

def decode_resource(response)
case response.headers["content-length"]
when nil then Hashie::Mash.new
when 0 then Hashie::Mash.new
when "0" then Hashie::Mash.new
if response.body.empty?
Hashie::Mash.new
else
if response.body.empty?
Hashie::Mash.new
else
Hashie::Mash.new(response.body)
end
Hashie::Mash.new(response.body)
end
end

Expand Down