IPv6 URIs contain brackets (i.e. http://[fd00::1]) which need to be removed before passing the address along to Net::HTTP. This fixes IPv6 support.
Strip brackets from address in IPv6 URIs
Looks like hostname is 1.9.3 only? What should we do for 1.8 support?
Shazbot. I had not considered 1.8.. looks like I will need to not use hostname.
Strip brackets with a Regex instead of #hostname