From c9ab29c91e265057379c2d32fa4a5991a46355ad Mon Sep 17 00:00:00 2001 From: Tuan Pham Anh Date: Wed, 1 Nov 2023 07:15:25 +0700 Subject: [PATCH] try to fix ssl issue with aiohttp --- server/rpc_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/rpc_server.go b/server/rpc_server.go index d6b9e74..81fadb9 100644 --- a/server/rpc_server.go +++ b/server/rpc_server.go @@ -127,6 +127,7 @@ func (m *RpcServer) jsonRpcOverHttp(w http.ResponseWriter, r *http.Request) { } fmt.Printf("body=%s\n", string(body)) + r.Body = io.NopCloser(bytes.NewBuffer(body)) // assign a new body with previous byte slice var j0 interface{} err = json.Unmarshal(body, &j0) @@ -291,7 +292,6 @@ func (m *RpcServer) jsonRpcOverHttp(w http.ResponseWriter, r *http.Request) { } } - r.Body = io.NopCloser(bytes.NewBuffer(body)) // assign a new body with previous byte slice r.Host = r.URL.Host state.ProxyMapRpc[selectedHost].ServeHTTP(w, r) }