code: def get_self_url_host(request_data):
          
          current_host = OneLogin_Saml2_Utils.get_self_host(request_data)
          port = ''
          if OneLogin_Saml2_Utils.is_https(request_data):
              protocol = 'https'
          else:
              protocol = 'http'
  
          if 'server_port' in request_data and request_data['server_port'] is not None:
              port_number = str(request_data['server_port'])
              port = ':' + port_number
  
              if protocol == 'http' and port_number == '80':
                  port = ''
              elif protocol == 'https' and port_number == '443':
                  port = ''
  
          return '%s://%s%s' % (protocol, current_host, port)
docs: 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