order of fields in json requests matter for sharkd (it shouldn't)
Summary
If I put the "params" before the "method" in the json I send to sharkd, I get an error that doesn't appear if the order is reverse.
Steps to reproduce
start sharkd with
sharkd unix:/tmp/sharkd.sock
then start the request
cat load-pcap.json | socat UNIX-CONNECT:/tmp/sharkd.sock -
with he following load-pcap.json
{ "jsonrpc": "2.0" , "id" : 1 , "params" : { "file": "a_valid.pcapng", "method":"load" } }
returns
{"jsonrpc":"2.0","id":1,"error":{"code":-32600,"message":"file is not a valid member name"}}
Now try the same command with
{ "jsonrpc": "2.0" , "id" : 1 , "params" : { "file": "a_valid.pcapng" }, "method":"load" }
as load-pcap.json and you get a nice answer
{"jsonrpc":"2.0","id":1,"result":{"status":"OK"}}
What is the current bug behavior?
What is the expected correct behavior?
Order shouldn't matter
Build information
3.6.1
Edited by Matthieu Coudron