From d4d737877a23b226a22a0f5561df35b8710d882e Mon Sep 17 00:00:00 2001 From: fedor Date: Thu, 6 Feb 2025 15:55:49 -0500 Subject: [PATCH] Fail partial downloads --- internal/agent/http_cache/http_cache.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/agent/http_cache/http_cache.go b/internal/agent/http_cache/http_cache.go index a7ed2ac7..99aebe1f 100644 --- a/internal/agent/http_cache/http_cache.go +++ b/internal/agent/http_cache/http_cache.go @@ -201,6 +201,7 @@ func proxyDownloadFromURL(w http.ResponseWriter, url string) bool { bytesRead, err := io.Copy(w, resp.Body) if err != nil { log.Printf("Proxying cache download for %s failed with %v\n", url, err) + return false } else { log.Printf("Proxying cache %s succeded! Proxies %d bytes!\n", url, bytesRead) }