代码
```
func main() {
http.Get("http://localhost:8888/hello")
}
```
header 是如下
```
map[User-Agent:[Go-http-client/1.1] Accept-Encoding:[gzip]]
```
请问下大家,这个User-Agent是在哪里设置的,我用debug从头跟到尾,直到程序结束Header都是空,为什么收到的请求User-Agent变成了Go-http-client/1.1 , 这个是谁填的,难到不是go填的?
找到了,系统是有设置的,是自已没注意到
```
// NOTE: This is not intended to reflect the actual Go version being used.
// It was changed at the time of Go 1.1 release because the former User-Agent
// had ended up on a blacklist for some intrusion detection systems.
// See https://codereview.appspot.com/7532043.
const defaultUserAgent = "Go-http-client/1.1"
```
#1