Issue 1:
by eyakubovich:

What does 'go version' print?

go version go1.3.1 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. Run a server that closes a connection by timeout: http://play.golang.org/p/qfkdd6hDat
2. Run the client: http://play.golang.org/p/hxTAdcdrOY

What happened?

The first request succeeds (get empty body) but subsequent requests intermittently fail.
Client output:

2014/09/03 17:53:56 []
2014/09/03 17:53:56 resp err= Get http://localhost/foo: EOF
2014/09/03 17:53:57 []
2014/09/03 17:53:57 resp err= Get http://localhost/foo: EOF
2014/09/03 17:53:58 []
2014/09/03 17:53:58 resp err= Get http://localhost/foo: EOF
2014/09/03 17:53:59 []
2014/09/03 17:53:59 resp err= Get http://localhost/foo: http: can't write HTTP request
on broken connection
2014/09/03 17:54:00 []
2014/09/03 17:54:00 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:01 []
2014/09/03 17:54:01 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:02 []
2014/09/03 17:54:02 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:03 []
2014/09/03 17:54:03 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:04 []
2014/09/03 17:54:04 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:05 body err= unexpected EOF
2014/09/03 17:54:06 []
2014/09/03 17:54:06 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:07 []
2014/09/03 17:54:07 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:08 []
2014/09/03 17:54:08 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:09 body err= unexpected EOF
2014/09/03 17:54:10 body err= unexpected EOF
2014/09/03 17:54:11 []
2014/09/03 17:54:11 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:12 body err= unexpected EOF
2014/09/03 17:54:13 []
2014/09/03 17:54:13 resp err= Get http://localhost/foo: EOF
2014/09/03 17:54:14 body err= unexpected EOF
2014/09/03 17:54:15 []

What should have happened instead?
- Subsequent requests should behave identically by returning empty body.
- Note that the server may have closed the connection abruptly. That can result in
resp.Body.Read() failing. However the Get() should not fail with EOF.

Please provide any additional information below.

Issue 2:
Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. the code http://play.golang.org/p/au0SyUo0jN
2.
3.

What is the expected output?

ability to connects to remote with local ip/port binding.

What do you see instead?

no local binding avaible.

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

Linux y570-yin 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 x86_64
x86_64 x86_64 GNU/Linux

Which version are you using? (run 'go version')

go version go1.0.3

Please provide any additional information below.

In some case, we wanna to dial remote host with special local address and local port,
net.DialIP/net.DialTCP/net.DialUDP/net.DialUnix can do this, but net.Dial no.

should we do it?

Attachments:

dialext.go (3510 bytes)