Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

fix(rpc): handle rpc request with empty params #130

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

tomonari-t
Copy link
Contributor

@tomonari-t tomonari-t commented Jun 10, 2020

I re-created from #122

Why this PR is needed

By JSON-RPC 2.0 Specification, params member may be omitted.

But I send below request, application is crushed.

% curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","id":1,"method":"web3_clientVersion", "id": 1}' http://localhost:8545

@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 92.708% when pulling aab5b24 on handle-rpc-params-empty into cc81d4e on master.

@coveralls
Copy link

coveralls commented Jun 10, 2020

Coverage Status

Coverage increased (+0.004%) to 92.708% when pulling aab5b24 on handle-rpc-params-empty into cc81d4e on master.

@tomonari-t tomonari-t added RPC JSON-RPC related tasks type: bug labels Jun 10, 2020
Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, looks good, thanks for the contribution! 😄

@holgerd77 holgerd77 merged commit f7c810e into master Jun 10, 2020
@holgerd77 holgerd77 deleted the handle-rpc-params-empty branch June 10, 2020 14:24
@tomonari-t
Copy link
Contributor Author

Thanks for reviewing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
RPC JSON-RPC related tasks type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants