Regarding 8220575: Correctly format test URI's that contain a retrieved IPv6 address
Chris Hegarty
chris.hegarty at oracle.com
Fri Mar 22 17:02:41 UTC 2019
Arthur,
> On 19 Mar 2019, at 15:31, Arthur Eubanks <aeubanks at google.com> wrote:
>
> (Sorry for the late response, I keep getting sidetracked by other stuff)
>
> Is there a reason you're trying to deprecate the URL constructors?
Yes, they are generally more error-prone than using URI, since they
don’t encode illegal characters in the various components.
> And if we end up not using the URL constructors, then I still think it would be nice to have a test library, since it's easy to forget to add the "[]". Unless we fix up all the existing tests and you'll be sure to catch any future bad uses of the loopback address in URLs in tests :)
Test library support would be fine. ( it would require some additional
jtreg tags and imports, but that is not a reason to avoid it )
If we do add test library support, then maybe we could take the
opportunity to construct it in a way where we could gain experience for
future possible projects, e.g.
URIBuilder.newBuilder()
.scheme("http")
.host("www.example.com")
.path("/sample")
.query("version=12")
.build()
.toURL();
With suitable encoding / raw variants. Daniel has prototyped something
similar for the URI update investigation work.
-Chris.
More information about the net-dev
mailing list