HttpRequestService::get_http_url PHP Method

get_http_url() public method

parses the url and rebuilds it to be scheme://host/path
public get_http_url ( )
    public function get_http_url()
    {
        $parts = parse_url($this->http_url);
        $port = @$parts['port'];
        $scheme = $parts['scheme'];
        $host = $parts['host'];
        $path = @$parts['path'];
        $port or $port = $scheme == 'https' ? '443' : '80';
        if ($scheme == 'https' && $port != '443' || $scheme == 'http' && $port != '80') {
            $host = "{$host}:{$port}";
        }
        return "{$scheme}://{$host}{$path}";
    }