set to 404 when failed to read file id

This commit is contained in:
Chris Lu
2014-02-06 12:00:58 -08:00
parent d0147a16a9
commit f68e15da89

View File

@@ -90,11 +90,13 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
volumeId, err := storage.NewVolumeId(vid)
if err != nil {
glog.V(2).Infoln("parsing error:", err, r.URL.Path)
w.WriteHeader(http.StatusNotFound)
return
}
err = n.ParsePath(fid)
if err != nil {
glog.V(2).Infoln("parsing fid error:", err, r.URL.Path)
w.WriteHeader(http.StatusNotFound)
return
}