http2: remove square brackets from parsed hostname
Make http2.connect()
work when using URLs with literal IPv6
addresses.
Fixes: https://github.com/nodejs/node/issues/28216
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines