-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed as not planned
Closed as not planned
Copy link
Labels
stalefor use by stalebotfor use by stalebot
Description
Tendermint version: 0.34.14
ABCI app: https://xnet.rpc.agoric.net/
What happened:
A GET /abci_query request with path query parameter as documented at https://docs.tendermint.com/master/rpc/#/ABCI/abci_query (i.e., a starting with "/") is rejected:
$ curl -sS 'https://xnet.rpc.agoric.net/abci_query?path=/custom/vstorage/data/activityhash'
{
"jsonrpc": "2.0",
"id": -1,
"error": {
"code": -32602,
"message": "Invalid params",
"data": "error converting http params to arguments: invalid character '/' looking for beginning of value"
}
}Wrapping that path in double quote characters works:
$ curl -sS 'https://xnet.rpc.agoric.net/abci_query?path="/custom/vstorage/data/activityhash"'
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"response": {
"code": 0,
"log": "",
"info": "",
"index": "0",
"key": null,
"value": "ewogICJ2YWx1ZSI6ICJhZWI1NTgxYTc5ZTExNTM5NDU5ODk0Y2U3OWI2YzgwNzk4ZTRkYjc2MjIyNTNiMWZjZGYwM2FmNzQ1ZGQxYzQ2Igp9",
"proofOps": null,
"height": "526634",
"codespace": ""
}
}
}So does submitting the entire request as POSTed JSON-RPC:
$ curl -sS https://xnet.rpc.agoric.net --request POST --header 'Content-Type: application/json' --data \
'{ "jsonrpc": "2.0", "id": -1, "method": "abci_query", "params": { "path": "/custom/vstorage/data/activityhash" } }'
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"response": {
"code": 0,
"log": "",
"info": "",
"index": "0",
"key": null,
"value": "ewogICJ2YWx1ZSI6ICI2ZGNiZjQzYjI2YmUwNzI1YzM0NjI4MDAxYTgzMTFlNjc3NWUwZjMyMTQxOGZhMzJmZTgxZTk1MmVkMzRkZDM3Igp9",
"proofOps": null,
"height": "526662",
"codespace": ""
}
}
}What you expected to happen:
I expected the unquoted path URL query parameter value to be accepted as documented at https://docs.tendermint.com/master/rpc/#/ABCI/abci_query , rather than rejected for not being JSON.
Have you tried the latest version: no, but httpParamsToArgs has not changed since #4968 two years ago.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stalefor use by stalebotfor use by stalebot