diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-18 23:51:08 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-18 23:51:08 -0700 |
| commit | 58dd8803224dd5340c54cecf843363fa2570905f (patch) | |
| tree | 37a14e5b81b3273fac1c99de5c31832749875cf1 | |
| parent | b6f99c4d83ec7eda931790953b1b6854357a2cce (diff) | |
| download | seaweedfs-58dd8803224dd5340c54cecf843363fa2570905f.tar.xz seaweedfs-58dd8803224dd5340c54cecf843363fa2570905f.zip | |
minor
| -rw-r--r-- | weed/util/http_util.go | 4 |
1 files changed, 3 insertions, 1 deletions
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 } |
