swarm/api: bug fix exact match for manifest
This commit is contained in:
@ -436,6 +436,16 @@ func (self *manifestTrie) findPrefixOf(path string, quitC chan bool) (entry *man
|
||||
if len(path) <= epl {
|
||||
if entry.Path[:len(path)] == path {
|
||||
if entry.ContentType == ManifestType {
|
||||
err := self.loadSubTrie(entry, quitC)
|
||||
if err == nil && entry.subtrie != nil {
|
||||
subentries := entry.subtrie.entries
|
||||
for i := 0; i < len(subentries); i++ {
|
||||
sub := subentries[i]
|
||||
if sub != nil && sub.Path == "" {
|
||||
return sub, len(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
entry.Status = http.StatusMultipleChoices
|
||||
}
|
||||
pos = len(path)
|
||||
|
Reference in New Issue
Block a user