Request::getPort failed with IPv6 hosts

Fix Request::getPort returning incorrect port values when HTTP_HOST is a
IPv6 address.