aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/stream.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2021-05-24 00:39:55 -0700
committerGitHub <noreply@github.com>2021-05-24 00:39:55 -0700
commit15859a7daabd637cd91dede2cfc76d874e7174a4 (patch)
tree5eb4f327c53e2525d372d19bce62984539c62e71 /weed/filer/stream.go
parent359a08ecbad0b010811af367c2a2677fadfb53ae (diff)
parent84dce32a5781268f6dbd0101e3bab65c04e0a1c7 (diff)
downloadseaweedfs-15859a7daabd637cd91dede2cfc76d874e7174a4.tar.xz
seaweedfs-15859a7daabd637cd91dede2cfc76d874e7174a4.zip
Merge pull request #2074 from kmlebedev/head_check_all_chunks
avoid http error: superfluous response.WriteHeader
Diffstat (limited to 'weed/filer/stream.go')
-rw-r--r--weed/filer/stream.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/weed/filer/stream.go b/weed/filer/stream.go
index eb02d0e56..70a278ca5 100644
--- a/weed/filer/stream.go
+++ b/weed/filer/stream.go
@@ -43,13 +43,12 @@ func StreamContent(masterClient wdclient.HasLookupFileIdFunction, w io.Writer, c
stats.FilerRequestHistogram.WithLabelValues("chunkDownload").Observe(time.Since(start).Seconds())
if err != nil {
stats.FilerRequestCounter.WithLabelValues("chunkDownloadError").Inc()
- glog.Errorf("read chunk: %v", err)
return fmt.Errorf("read chunk: %v", err)
}
+
_, err = w.Write(data)
if err != nil {
stats.FilerRequestCounter.WithLabelValues("chunkDownloadedError").Inc()
- glog.Errorf("write chunk: %v", err)
return fmt.Errorf("write chunk: %v", err)
}
stats.FilerRequestCounter.WithLabelValues("chunkDownload").Inc()