Skip to content

Ensure ClientURL() properly formats IPv6 literal addresses#5725

Merged
derekcollison merged 1 commit intomainfrom
neil/clienturl
Jul 31, 2024
Merged

Ensure ClientURL() properly formats IPv6 literal addresses#5725
derekcollison merged 1 commit intomainfrom
neil/clienturl

Conversation

@neilalexander
Copy link
Copy Markdown
Member

Using net.JoinHostPort() properly surrounds IPv6 literals with square brackets. Using url.URL ensures that hostnames will be properly encoded.

Signed-off-by: Neil Twigg neil@nats.io

Using `net.JoinHostPort()` properly surrounds IPv6 literals with square
brackets. Using `url.URL` ensures that hostnames will be properly encoded.

Signed-off-by: Neil Twigg <neil@nats.io>
@neilalexander neilalexander linked an issue Jul 31, 2024 that may be closed by this pull request
@neilalexander neilalexander marked this pull request as ready for review July 31, 2024 12:28
@neilalexander neilalexander requested a review from a team as a code owner July 31, 2024 12:28
Copy link
Copy Markdown
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekcollison derekcollison merged commit 32ba330 into main Jul 31, 2024
@derekcollison derekcollison deleted the neil/clienturl branch July 31, 2024 14:20
neilalexander added a commit that referenced this pull request Aug 6, 2024
Includes the following:

- #5690
- #5725
- #5729
- #5734
- #5735
- #5736
- #5743
- #5744
- #5751
- #5755
- #5754
- #5732
- #5750
- #5756

The following were reverted before this PR:
- #5602

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server.ClientURL returns invalid URL if opts.Host is IPv6

3 participants