Remove default JSON body

This commit is contained in:
wpetit 2019-04-07 15:55:36 +02:00
parent 41f3d5c7ac
commit d550596d52
1 changed files with 1 additions and 5 deletions

View File

@ -16,10 +16,6 @@ import (
"forge.cadoles.com/wpetit/go-http-peering/server" "forge.cadoles.com/wpetit/go-http-peering/server"
) )
const (
DefaultBody = "{}"
)
var ( var (
ErrInvalidPrivateKey = errors.New("invalid private key") ErrInvalidPrivateKey = errors.New("invalid private key")
ErrUnexpectedResponse = errors.New("unexpected response") 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) { func (c *Client) createBodySum(body []byte) ([]byte, error) {
if body == nil || len(body) == 0 { if body == nil || len(body) == 0 {
body = []byte(DefaultBody) body = []byte("")
} }
sha := sha256.New() sha := sha256.New()
_, err := sha.Write(body) _, err := sha.Write(body)