Adds user configurable timeout to gopher and gemini connections (as single value) #178

Merged
sloum merged 4 commits from timeout-setting into release2.3.2 2020-07-10 04:37:02 +00:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit 3d85b43732 - Show all commits

View File

@ -333,6 +333,9 @@ func Visit(host, port, resource string, td *TofuDigest) (Capsule, error) {
case 2:
mimeAndCharset := strings.Split(header[1], ";")
meta = mimeAndCharset[0]
if meta == "" {
meta = "text/gemini"
}
minMajMime := strings.Split(meta, "/")
if len(minMajMime) < 2 {
return capsule, fmt.Errorf("Improperly formatted mimetype received from server")