mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 20:06:19 +08:00
set to 400 Bad Request when failed to parse file id, recommended by
claudiu
This commit is contained in:
@@ -90,13 +90,13 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
|
|||||||
volumeId, err := storage.NewVolumeId(vid)
|
volumeId, err := storage.NewVolumeId(vid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(2).Infoln("parsing error:", err, r.URL.Path)
|
glog.V(2).Infoln("parsing error:", err, r.URL.Path)
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = n.ParsePath(fid)
|
err = n.ParsePath(fid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(2).Infoln("parsing fid error:", err, r.URL.Path)
|
glog.V(2).Infoln("parsing fid error:", err, r.URL.Path)
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user