From 027ffcb67df338165a3caa1e6c949e8f83e0c48b Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Mon, 30 Dec 2019 23:01:24 +0800 Subject: [PATCH] Fix: http vehicle shouldn't save file --- adapters/provider/vehicle.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/adapters/provider/vehicle.go b/adapters/provider/vehicle.go index 83143194..0b949368 100644 --- a/adapters/provider/vehicle.go +++ b/adapters/provider/vehicle.go @@ -92,15 +92,12 @@ func (h *HTTPVehicle) Read() ([]byte, error) { if err != nil { return nil, err } + buf, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, err } - if err := ioutil.WriteFile(h.path, buf, fileMode); err != nil { - return nil, err - } - return buf, nil }