mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 23:49:23 +08:00
supporting reading file of size zero
This commit is contained in:
@@ -67,7 +67,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
|||||||
cookie := n.Cookie
|
cookie := n.Cookie
|
||||||
count, e := vs.store.ReadVolumeNeedle(volumeId, n)
|
count, e := vs.store.ReadVolumeNeedle(volumeId, n)
|
||||||
glog.V(4).Infoln("read bytes", count, "error", e)
|
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)
|
glog.V(0).Infoln("read error:", e, r.URL.Path)
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user