Since IPv6 addresses are wrapped by brackets in URIs, this method returns
IPv6 addresses wrapped by brackets. This form is not appropriate to pass
socket methods such as TCPSocket.open. If unwrapped host names are
required, use “hostname” method.

Public Class Methods

Creates a new URI::Generic instance from
components of URI::Generic with check.
Components are: scheme, userinfo, host, port, registry, path, opaque, query
and fragment. You can provide arguments either by an Array or a Hash. See
new for hash keys to use or for order of array items.

But http_proxy and HTTP_PROXY is treated specially under CGI environment.
It’s because HTTP_PROXY may be set by Proxy: header. So HTTP_PROXY is not
used. http_proxy is not used too if the variable is case insensitive.
CGI_HTTP_PROXY can be used instead.