Skip to content

Commit

Permalink
try to fix ssl issue with aiohttp
Browse files Browse the repository at this point in the history
  • Loading branch information
baabeetaa committed Nov 1, 2023
1 parent ef9321d commit c9ab29c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/rpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit c9ab29c

Please sign in to comment.