Browse Source

return 404 if lookup location list is empty.

pull/279/head
tnextday 10 years ago
parent
commit
a9adfdf8a3
  1. 2
      go/weed/weed_server/master_server_handlers.go

2
go/weed/weed_server/master_server_handlers.go

@ -24,7 +24,7 @@ func (ms *MasterServer) lookupVolumeId(vids []string, collection string) (volume
volumeId, err := storage.NewVolumeId(vid)
if err == nil {
locationList := ms.Topo.Lookup(collection, volumeId)
if locationList != nil {
if locationList != nil && locationList.Length() > 0 {
var ret operation.Locations
for _, dn := range locationList.AllDataNode() {
ret = append(ret, operation.Location{Url: dn.Url(), PublicUrl: dn.PublicUrl})

Loading…
Cancel
Save