mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 09:21:32 +00:00
rpc/lib/server: update with @melekes and @ebuchman feedback
This commit is contained in:
@ -118,8 +118,6 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc, logger log.Logger) http.Han
|
|||||||
// The Server MUST NOT reply to a Notification, including those that are within a batch request.
|
// The Server MUST NOT reply to a Notification, including those that are within a batch request.
|
||||||
if request.ID == "" {
|
if request.ID == "" {
|
||||||
logger.Debug("HTTPJSONRPC received a notification, skipping... (please send a non-empty ID if you want to call a method)")
|
logger.Debug("HTTPJSONRPC received a notification, skipping... (please send a non-empty ID if you want to call a method)")
|
||||||
// Not sending back a response here because according the JSONRPC
|
|
||||||
// specification Section 4.1, we SHOULD NOT one back when "id" == "".
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(r.URL.Path) > 1 {
|
if len(r.URL.Path) > 1 {
|
||||||
|
@ -75,7 +75,6 @@ func TestRPCParams(t *testing.T) {
|
|||||||
assert.False(t, statusOK(recv.Error.Code), "#%d: not expecting a 2XX success code", i)
|
assert.False(t, statusOK(recv.Error.Code), "#%d: not expecting a 2XX success code", i)
|
||||||
// The wanted error is either in the message or the data
|
// The wanted error is either in the message or the data
|
||||||
assert.Contains(t, recv.Error.Message+recv.Error.Data, tt.wantErr, "#%d: expected substring", i)
|
assert.Contains(t, recv.Error.Message+recv.Error.Data, tt.wantErr, "#%d: expected substring", i)
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user