Ladies and gentlemen, I have a problem.
Use http.Get (url) requests a page, the content is 0 or 1 return
golang will think malformed HTTP response
View code, it was such a judgment, do not know what the reasons for judgment?
pkg / net / http / response.go
f: = strings.SplitN (line, "", 3)
if len (f) <2 {dStringError {"malformed HTTP response", line}
return nil, & badStringError {"malformed HTTP response", line}
}
How to solve this problem? Ask you
2013/5/23 chen bo
<fay...@gmail.com>
各位,我遇到一个问题。
使用 http.Get(url) 请求一个页面时,返回内容为 0 或 1
golang就会认为 malformed HTTP response
查看代码,原来是这样判断的,不知道这样判断的理由什么?
pkg/net/http/response.go
f := strings.SplitN(line, " ", 3)
if len(f) < 2 {dStringError{"malformed HTTP response", line}
return nil, &badStringError{"malformed HTTP response", line}
}
怎么解决这个问题?请教各位
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.