Browse Source

set to 404 when failed to read file id

pull/2/head
Chris Lu 11 years ago
parent
commit
f68e15da89
  1. 2
      go/weed/weed_server/volume_server_handlers.go

2
go/weed/weed_server/volume_server_handlers.go

@ -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
}

Loading…
Cancel
Save