mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
Proxy all HTTP methods correctly.
This commit is contained in:
parent
c6b737b634
commit
ad1d1e541c
1 changed files with 2 additions and 1 deletions
|
|
@ -45,5 +45,6 @@ func (self *RoundTripper) RoundTrip(req *http.Request) (resp *http.Response, err
|
|||
}
|
||||
url := fmt.Sprintf("http://%s:%s/%s:/%s/%s", host, self.Port, req.Proto, req.URL.Host, req.URL.Path)
|
||||
glog.V(logger.Info).Infof("[BZZ] roundtripper: proxying request '%s' to '%s'", req.RequestURI, url)
|
||||
return http.Get(url)
|
||||
reqProxy, _ := http.NewRequest(req.Method, url, req.Body)
|
||||
return http.DefaultClient.Do(reqProxy)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue