From e7fab7d4bf1fb544e519408af07c75805898c1b2 Mon Sep 17 00:00:00 2001 From: Emmanuel Odeke Date: Fri, 20 Oct 2017 21:24:21 -0700 Subject: [PATCH] rpc/lib/server: update with @melekes and @ebuchman feedback --- rpc/lib/server/handlers.go | 2 -- rpc/lib/server/handlers_test.go | 1 - 2 files changed, 3 deletions(-) diff --git a/rpc/lib/server/handlers.go b/rpc/lib/server/handlers.go index 0b379b9ab..3a3c48f02 100644 --- a/rpc/lib/server/handlers.go +++ b/rpc/lib/server/handlers.go @@ -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 { diff --git a/rpc/lib/server/handlers_test.go b/rpc/lib/server/handlers_test.go index c816ede72..16467558b 100644 --- a/rpc/lib/server/handlers_test.go +++ b/rpc/lib/server/handlers_test.go @@ -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 } } }