Browse Source

supporting reading file of size zero

pull/455/head
Chris Lu 9 years ago
committed by chulin
parent
commit
e4eb4f7f85
  1. 2
      weed/server/volume_server_handlers_read.go

2
weed/server/volume_server_handlers_read.go

@ -80,7 +80,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

Loading…
Cancel
Save