Hi. I came across an issue in which when requesting exchange info against our CloudAMQP host. The response body contains the correct data, but the "content-length" header is null. This causes an empty Hashie Mash object to get returned due to the following code:
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
else
if response.body.empty?
Hashie::Mash.new
else
Hashie::Mash.new(response.body)
end
end
end
Here is a screenshot of my debugging context to demonstrate the issue:
Hi. I came across an issue in which when requesting exchange info against our CloudAMQP host. The response body contains the correct data, but the "content-length" header is null. This causes an empty Hashie Mash object to get returned due to the following code:
Here is a screenshot of my debugging context to demonstrate the issue: