From d550596d52562391479d890079ce5d7d57913f82 Mon Sep 17 00:00:00 2001 From: William Petit Date: Sun, 7 Apr 2019 15:55:36 +0200 Subject: [PATCH] Remove default JSON body --- client/client.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/client.go b/client/client.go index 4bceba9..3b6c1ee 100644 --- a/client/client.go +++ b/client/client.go @@ -16,10 +16,6 @@ import ( "forge.cadoles.com/wpetit/go-http-peering/server" ) -const ( - DefaultBody = "{}" -) - var ( ErrInvalidPrivateKey = errors.New("invalid private key") ErrUnexpectedResponse = errors.New("unexpected response") @@ -177,7 +173,7 @@ func (c *Client) addClientToken(r *http.Request, body []byte) error { func (c *Client) createBodySum(body []byte) ([]byte, error) { if body == nil || len(body) == 0 { - body = []byte(DefaultBody) + body = []byte("") } sha := sha256.New() _, err := sha.Write(body)