Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON-RPC request Content-Type is application/json #29946

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luke-jr
Copy link
Member

@luke-jr luke-jr commented Apr 23, 2024

This goes all the way back to #3246, and it's not clear why text/plain has been used throughout.

There seems to be a lack of specification of what the correct content-type is, but application/json seems correct and popular, and text/plain definitely isn't.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 23, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK laanwj

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #27101 (Support JSON-RPC 2.0 when requested by client by pinheadmz)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot
Copy link
Contributor

🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the
documentation.

Possibly this is due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.

Leave a comment here, if you need help tracking down a confusing failure.

Debug: https://github.com/bitcoin/bitcoin/runs/24176571360

@laanwj
Copy link
Member

laanwj commented Apr 24, 2024

IIRC we do return application/json content type, so this at least makes it symmetric. id be against enforcing this (because so many clients already specify it wrong), but the example would be better this way.

@fanquake fanquake changed the title Bugfix: JSON-RPC request Content-Type is application/json JSON-RPC request Content-Type is application/json Apr 24, 2024
@fanquake
Copy link
Member

Removed bugfix given this is a doc/test only change.

@laanwj
Copy link
Member

laanwj commented Apr 30, 2024

Code review ACK f90a84d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants