-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utils/proxy: fix unit tests for go 1.8
We were passing IPv6 addresses into the url.Parse function, which is not valid. We pass in a valid IPv6 URL, including brackets to identify the address as IPv6. This identified an issue with the internal "canonicalAddr" function, which was tacking the port onto the end of the address. That was making use of the Host part of the URL, which in the case of IPv6 includes the brackets. JoinHostPort adds on brackets unconditionally if the address contains colons; so the input must not already have brackets. Strip them off first.
- Loading branch information
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters