Browse Source

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

pull/745/head
Emmanuel Odeke 7 years ago
parent
commit
e7fab7d4bf
2 changed files with 0 additions and 3 deletions
  1. +0
    -2
      rpc/lib/server/handlers.go
  2. +0
    -1
      rpc/lib/server/handlers_test.go

+ 0
- 2
rpc/lib/server/handlers.go 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 {


+ 0
- 1
rpc/lib/server/handlers_test.go 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
}
}
}

Loading…
Cancel
Save