Fixes issue where type 7 response still queries for search.
This commit is contained in:
parent
f455a86fc3
commit
2e964cc586
|
@ -95,6 +95,9 @@ func Visit(addr, openhttp string) (View, error) {
|
|||
|
||||
return View{}, fmt.Errorf("")
|
||||
}
|
||||
} else if u.Gophertype == "7" && strings.Contains(u.Resource, "\t") {
|
||||
u.Gophertype = "1"
|
||||
u.Full = u.Scheme + "://" + u.Host + ":" + u.Port + "/" + u.Gophertype + u.Resource
|
||||
}
|
||||
|
||||
text, err := Retrieve(u)
|
||||
|
|
|
@ -46,9 +46,8 @@ func (v *View) ParseMap() {
|
|||
} else {
|
||||
title = ""
|
||||
}
|
||||
if len(line[0]) > 0 && string(line[0][0]) == "i" {
|
||||
if len(line) > 1 && len(line[0]) > 0 && string(line[0][0]) == "i" {
|
||||
v.Content[i] = " " + string(title)
|
||||
continue
|
||||
} else if len(line) >= 4 {
|
||||
fulllink := fmt.Sprintf("%s:%s/%s%s", line[2], line[3], string(line[0][0]), line[1])
|
||||
v.Links = append(v.Links, fulllink)
|
||||
|
|
Loading…
Reference in New Issue