diff --git a/swarm/api/http/roundtripper.go b/swarm/api/http/roundtripper.go index ef2553118a..69c501e5be 100644 --- a/swarm/api/http/roundtripper.go +++ b/swarm/api/http/roundtripper.go @@ -45,6 +45,9 @@ 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) - reqProxy, _ := http.NewRequest(req.Method, url, req.Body) + reqProxy, err := http.NewRequest(req.Method, url, req.Body) + if err != nil { + return nil, err + } return http.DefaultClient.Do(reqProxy) }