Given a simple JSON-RPC server in http://play.golang.org/p/S9vSE6lVFR, requests fail
with "rpc: JSON decoder out of sync - data changing underfoot?" when given a
JSON-RPC request like the following:
{"jsonrpc":"2.0","method":"Server.Echo","params":["article",{"category":1}],"id":"1"}
To reproduce, connect to the server via telnet and echo the above string.
In this case, it seems that jsonrpc is not ignoring the additional object parameter,
which leads to the above issue.
GDB tells me that the error is reached in decode.go:383.
Using go version 1.0.1, on ArchLinux x86-64, using the 6g compiler.
The text was updated successfully, but these errors were encountered:
A reduced test case is in http://play.golang.org/p/OYCGWFzZGp
The problem seems to appear only when the last element in a JSON array is an object, and
is ignored.
by ThoughtMonster:
The text was updated successfully, but these errors were encountered: