@staticmethod<EOL><INDENT>def get_self_url_host(request_data):<DEDENT>
current_host = OneLogin_Saml2_Utils.get_self_host(request_data)<EOL>port = '<STR_LIT>'<EOL>if OneLogin_Saml2_Utils.is_https(request_data):<EOL><INDENT>protocol = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>protocol = '<STR_LIT:http>'<EOL><DEDENT>if '<STR_LIT>' in request_data and request_data['<STR_LIT>'] is not None:<EOL><INDENT>port_number = str(request_data['<STR_LIT>'])<EOL>port = '<STR_LIT::>' + port_number<EOL>if protocol == '<STR_LIT:http>' and port_number == '<STR_LIT>':<EOL><INDENT>port = '<STR_LIT>'<EOL><DEDENT>elif protocol == '<STR_LIT>' and port_number == '<STR_LIT>':<EOL><INDENT>port = '<STR_LIT>'<EOL><DEDENT><DEDENT>return '<STR_LIT>' % (protocol, current_host, port)<EOL>
Returns the protocol + the current host + the port (if different than
common ports).

:param request_data: The request as a dict
:type: dict

:return: Url
:rtype: string