Fix: http vehicle shouldn't save file

This commit is contained in:
gVisor bot 2019-12-30 23:01:24 +08:00
parent 41a8937873
commit 027ffcb67d

View File

@ -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
}