toughen up error handling for invalid fid

This commit is contained in:
Chris Lu
2013-12-09 13:53:24 -08:00
parent 512899e6a6
commit 1bf75f7f73
3 changed files with 22 additions and 12 deletions

View File

@@ -92,7 +92,11 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
glog.V(2).Infoln("parsing error:", err, r.URL.Path)
return
}
n.ParsePath(fid)
err = n.ParsePath(fid)
if err != nil {
glog.V(2).Infoln("parsing fid error:", err, r.URL.Path)
return
}
glog.V(2).Infoln("volume", volumeId, "reading", n)
if !vs.store.HasVolume(volumeId) {