rpc/lib/server: update with @melekes and @ebuchman feedback

This commit is contained in:
Emmanuel Odeke 2017-10-20 21:24:21 -07:00
parent 59556ab030
commit e7fab7d4bf
2 changed files with 0 additions and 3 deletions

View File

@ -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.
if request.ID == "" {
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
}
if len(r.URL.Path) > 1 {

View File

@ -75,7 +75,6 @@ func TestRPCParams(t *testing.T) {
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
assert.Contains(t, recv.Error.Message+recv.Error.Data, tt.wantErr, "#%d: expected substring", i)
continue
}
}
}