log.Printf("%s: can not read response: %+v\n", req.URL, err)
return false, err
}
- cols := strings.SplitN(rawResp, " ", 2)
+ cols := strings.SplitN(strings.TrimRight(rawResp, "\r\n"), " ", 2)
if len(cols) < 2 {
err = fmt.Errorf("invalid response format: %s", rawResp)
log.Printf("%s: %s\n", req.URL, err)