From 3cb00710252ac004569eeeb73adace5024e9a2cc Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 21 Jan 2017 13:45:16 -0800 Subject: [PATCH] supporting reading file of size zero --- weed/server/volume_server_handlers_read.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go index 2a273c595..b111fb1af 100644 --- a/weed/server/volume_server_handlers_read.go +++ b/weed/server/volume_server_handlers_read.go @@ -67,7 +67,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) cookie := n.Cookie count, e := vs.store.ReadVolumeNeedle(volumeId, n) glog.V(4).Infoln("read bytes", count, "error", e) - if e != nil || count <= 0 { + if e != nil || count < 0 { glog.V(0).Infoln("read error:", e, r.URL.Path) w.WriteHeader(http.StatusNotFound) return