def ProcessUrl(service, url, for_proxy=False):
 if (not isinstance(url, atom.url.Url)):
  url = atom.url.parse_url(url)
 server = url.host
 ssl = False
 port = 80
 if (not server):
  if hasattr(service, 'server'):
   server = service.server
  else:
   server = service
  if ((not url.protocol) and hasattr(service, 'ssl')):
   ssl = service.ssl
  if hasattr(service, 'port'):
   port = service.port
 else:
  if (url.protocol == 'https'):
   ssl = True
  elif (url.protocol == 'http'):
   ssl = False
  if url.port:
   port = int(url.port)
  elif ((port == 80) and ssl):
   port = 443
 return (server, port, ssl, url.get_request_uri())

def ProcessUrl ( service , url , for_proxy = False ) : if ( not isinstance ( url , atom . url . Url ) ) : url = atom . url . parse_url ( url ) server = url . host ssl = False port = 80 if ( not server ) : if hasattr ( service , 'server' ) : server = service . server else : server = service if ( ( not url . protocol ) and hasattr ( service , 'ssl' ) ) : ssl = service . ssl if hasattr ( service , 'port' ) : port = service . port else : if ( url . protocol == 'https' ) : ssl = True elif ( url . protocol == 'http' ) : ssl = False if url . port : port = int ( url . port ) elif ( ( port == 80 ) and ssl ) : port = 443 return ( server , port , ssl , url . get_request_uri ( ) )
processes a passed url .