Fix IPV6 support

In c3373e4, @danielsdeleo added support for IPV6, but I didn't understand the purpose of the bracket notation. I thought they were part of the `host`, but they are actually part of the URL. We _need_ the brackets in the URL, but we _cannot_ have the brackets in the host.