From 58dd8803224dd5340c54cecf843363fa2570905f Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 18 Aug 2022 23:51:08 -0700 Subject: [PATCH] minor --- weed/util/http_util.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/util/http_util.go b/weed/util/http_util.go index 92681d8e8..00dac26f7 100644 --- a/weed/util/http_util.go +++ b/weed/util/http_util.go @@ -331,7 +331,9 @@ func ReadUrlAsStream(fileUrl string, cipherKey []byte, isContentGzipped bool, is for { m, err = reader.Read(buf) - fn(buf[:m]) + if m > 0 { + fn(buf[:m]) + } if err == io.EOF { return false, nil }