huydx / hget

interruptable, resumable download accelerator written in golang
MIT License
984 stars 68 forks source link

Not support host contains port,such as http://example:8000/something #34

Open hhofchina opened 4 years ago

hhofchina commented 4 years ago

fix http.go:47

//       ips, err := net.LookupIP(parsed.Host) 
        host := parsed.Host
        if strings.LastIndex(host, ":") != -1 {
        host = parsed.Host[:strings.LastIndex(host, ":")]
    }
    ips, err := net.LookupIP(host)