0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00

handle error returned when fetching remote images

This commit is contained in:
Will Norris 2014-11-19 22:22:21 -08:00
parent dae09a8c9d
commit 7994cb2cf6

View file

@ -168,6 +168,9 @@ func (t *TransformingTransport) RoundTrip(req *http.Request) (*http.Response, er
u := *req.URL
u.Fragment = ""
resp, err := t.Client.Get(u.String())
if err != nil {
return nil, err
}
defer resp.Body.Close()
b, err := ioutil.ReadAll(resp.Body)