net/http: Transport.DialContext breaks existing code #16703
Labels
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
In Go 1.7 the new http.Transport.DialContext field overrides the Dial field.
This breaks any existing code that takes the http.DefaultTransport,
sets Dial and expects network calls to be made using that value.
This did actually break some of our test code that used this functionality
to prevent accidental external network access in tests.
For better backward compatibility, perhaps it might be better to make Dial
override DialContext - existing code will continue to work unchanged
and most new code will never touch Dial, so the override isn't so important
in that case.
The text was updated successfully, but these errors were encountered: