From f79a38cd9d87b4ad6a0054fe30685d96a514b481 Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Wed, 14 Aug 2019 14:01:21 +0300 Subject: [PATCH] uri: mitigate breaking change Ref: golang/go#29098 --- uri.go | 2 ++ uri_test.go | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/uri.go b/uri.go index ebd2ef5..e26fe53 100644 --- a/uri.go +++ b/uri.go @@ -44,6 +44,8 @@ func ParseURI(rawURI string) (URI, error) { } // Using URL methods to split host. u.Host = u.Opaque + // TODO: validate host and port. + // See https://github.com/golang/go/issues/29098. host, rawPort := u.Hostname(), u.Port() uri := URI{ Scheme: u.Scheme, diff --git a/uri_test.go b/uri_test.go index be373fd..cbedd50 100644 --- a/uri_test.go +++ b/uri_test.go @@ -53,10 +53,6 @@ func TestParseURI(t *testing.T) { name: "hierarchical", in: "stun://example.org", }, - { - name: "bad port", - in: "stun:example.org:port", - }, { name: "bad scheme", in: "tcp:example.org",