From ad1d1e541cc5a392df1825b49563c83d884b2503 Mon Sep 17 00:00:00 2001 From: "Daniel A. Nagy" Date: Thu, 18 Feb 2016 20:08:27 +0100 Subject: [PATCH] Proxy all HTTP methods correctly. --- swarm/api/http/roundtripper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swarm/api/http/roundtripper.go b/swarm/api/http/roundtripper.go index 9ca981b5f5..ef2553118a 100644 --- a/swarm/api/http/roundtripper.go +++ b/swarm/api/http/roundtripper.go @@ -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) }