Use correct mime type on fetch of execution config #282
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When vouch was configured to fetch the blockrelay/executionconfig from an http endpoint, the respective majordomo call did not properly set the
Content-Type
andAccept
headers. Instead,Content-Type: text/plain
was sent.This commit adds the respective
MIMEType
value to the majordomo context [1] so that these requests are now sent with theContent-Type
andAccept
headers set toapplication/json
.Contribution
I ran the tests locally and they were passing. I also ran an integration test with an
mitmproxy
for introspection of the request:Without this patch:
Incorrect header is sent and our endpoint rejects the unsupported media type text/plain
With this patch:
Headers are correctly set to
application/json
and our endpoint responds politely ;-)References