Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
/v1/catalog/register is broken after upgrade to v2.1.2 #189
We're currently using consul v0.7.0 in our environment, and I'm using this gem to make calls to the
I'm making calls similar to this:
I've captured the HTTP payloads of a request and response on working example (gem v2.1.1) and on a broken example (gem v2.1.2) for you:
v2.1.1 (working as expected)
v2.1.2 (Not working - Consul returns HTTP 400)
As you can see above, in both requests Faraday is sending
In the first request (v2.1.1) the gem is sending the body as a JSON payload.
If we make assumptions about what ought to be happening, v2.1.1 is arguably sending the 'incorrect' content-type header with its JSON payload, even though consul successfully accepts the JSON payload with the mismatched header.
However, when we attempt to send it a form-urlencoded payload with an x-www-form-urlencoded content-type header, consul rejects it.
I suspect that it's related to the JSON.dump() at https://github.com/WeAreFarmGeek/diplomat/compare/v2.1.1...v2.1.2?diff=split#diff-8f9f0d1ed7f32ce8ac36895fa3a85486R50
Let me know if you require any more information regarding this behaviour, and thanks for your work on this gem!