Browse Source

set to 400 Bad Request when failed to parse file id, recommended by

claudiu
pull/2/head
Chris Lu 11 years ago
parent
commit
91829057c5
  1. 4
      go/weed/weed_server/volume_server_handlers.go

4
go/weed/weed_server/volume_server_handlers.go

@ -90,13 +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)
w.WriteHeader(http.StatusBadRequest)
return
}
err = n.ParsePath(fid)
if err != nil {
glog.V(2).Infoln("parsing fid error:", err, r.URL.Path)
w.WriteHeader(http.StatusNotFound)
w.WriteHeader(http.StatusBadRequest)
return
}

Loading…
Cancel
Save