EVM Node: Support charset=utf-8 in Content-Type
The EVM node does not support letting the user select their charset as part of
the Content-Type definition. It is arguably a problem that we inherit from
our HTTP stack, and a proper fix should be implemented at this level.
In the meantime, we propose this dirty but working patch to support the UTF-8
charset.
Manually testing the MR
I have deployed an observer node with the patch.
Check it is the correct version
$curl https://rpc.etherlink-testnet.tz.soap.coffee/version
"octez-evm-node/Octez 0.0+dev-30fd558e/Unix/ocamlc.4.14.1"
Then try manually to call the node with a Content-Type
mentioning the charset to use.
$ curl -f -X POST -H 'Content-Type: application/json; charset=utf-8' --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x37d40f4CD7c085Acaa915Ad614749236a9EF8f0B","data":"0x19ba0b63"},"latest"],"id":1}' https://rpc.etherlink-testnet.tz.soap.coffee
{"jsonrpc":"2.0","result":"0x0000000000000000000000000000000000000000000000000000000000000000","id":1}
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rst
for the protocol and the environment,CHANGES.rst
at the root of the repository for everything else). -
Select suitable reviewers using the Reviewers
field below. -
Select as Assignee
the next person who should take action on that MR
Edited by Thomas Letan