We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d7bd3f8 + e9e32da commit 052282cCopy full SHA for 052282c
1 file changed
lib/rabbitmq/http/client.rb
@@ -426,16 +426,10 @@ def encode_uri_path_segment(segment)
426
end
427
428
def decode_resource(response)
429
- case response.headers["content-length"]
430
- when nil then Hashie::Mash.new
431
- when 0 then Hashie::Mash.new
432
- when "0" then Hashie::Mash.new
+ if response.body.empty?
+ Hashie::Mash.new
433
else
434
- if response.body.empty?
435
- Hashie::Mash.new
436
- else
437
- Hashie::Mash.new(response.body)
438
- end
+ Hashie::Mash.new(response.body)
439
440
441
0 commit comments