From a08b1f34589af8fb6ae6cb140ee998f05db1e815 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 20 Mar 2020 14:58:59 +0100 Subject: [PATCH] src/eosapi/functions.go: in send() u.Host can contain port also. so we need to remove it when setting the Host header. --- src/eosapi/functions.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/eosapi/functions.go b/src/eosapi/functions.go index bccef3c..574df52 100644 --- a/src/eosapi/functions.go +++ b/src/eosapi/functions.go @@ -2,6 +2,7 @@ package eosapi; import ( + "strings" "time" "net/url" "io/ioutil" @@ -28,7 +29,7 @@ func send(method string, api_url string) (*req.Resp, error) { // nodeos api does not like that, so we need to provide our // own Host header with just the host. headers := req.Header{ - "Host": u.Host, + "Host": strings.Split(u.Host, ":")[0], } r := req.New()