-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[PAPYRUS-2.2.0-rc] Content type in JSON RPC response #1390
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
pipeline:run |
pipeline:run |
Correct me if I'm wrong, but I recall that RSK only returns JSON objects when the HTTP status is 200. The public node seems to confirm that:
Will we be adding |
AFAIK, only to responses that returns a co.rsk.rpc.netty.Web3Result
El mar, 15 dic 2020 a las 14:43, Lucas (<notifications@github.com>)
escribió:
… Correct me if I'm wrong, but I recall that RSK only returns JSON objects
when the HTTP status is 200. The public node seems to confirm that:
$ curl -v -d '{"jsonrpc":"2.0","id":"pr1390","method":"eth_clientVersion"}' https://public-node.testnet.rsk.co/2.0.1 # note we aren't passing a "Content-Type: application/json" header
...
> POST /2.0.1 HTTP/2
> Host: public-node.testnet.rsk.co
> user-agent: curl/7.68.0
> accept: */*
> content-length: 60
> content-type: application/x-www-form-urlencoded
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
* We are completely uploaded and fine
< HTTP/2 415
< date: Tue, 15 Dec 2020 17:41:15 GMT
< content-length: 0
< x-varnish-cache: MISS-1
< server: Flex
< x-powered-by: RSK Smart
<
...
Will we be adding Content-Type: application/json to *all* the replies
from the RPC server?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1390 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHVN5H26HFTYAZWVUDZ2RLDSU6N37ANCNFSM4USMGNGQ>
.
|
pipeline: run |
piepline: run |
234290b
38daf11
to
234290b
Compare
pipeline: run |
2 similar comments
pipeline: run |
pipeline: run |
234290b
to
32a76f7
Compare
pipeline: run |
32a76f7
to
9e5a771
Compare
9e5a771
to
b656819
Compare
Kudos, SonarCloud Quality Gate passed!
|
fit: 2.2-rc
Description
Add a
Content-Type
header to JSON RPC responses, with valueapplication/json
to solve #1365 1365Motivation and Context
Current code does not returns the content type header in the responses to JSON RPC invocations.
How Has This Been Tested?
It was tested using
curl
Types of changes
Checklist: