def _get_host_from_url(self, url):
        """
        Return sanitized host (netloc) value from the provided url.
        """
        parsed = urlparse.urlparse(url)

        # Remove port and []
        host = parsed.netloc.replace("[", "").replace("]", "")

        if parsed.port is not None:
            host = host.replace(":%s" % (parsed.port), "")

        return host

        Return sanitized host (netloc) value from the provided url.
        
contrib/runners/http_runner/http_runner/http_runner.py