def CgiDictFromParsedUrl(url):
  environ = {}
  if url.port is not None:
    environ['SERVER_PORT'] = str(url.port)
  elif url.scheme == 'https':
    environ['SERVER_PORT'] = '443'
  elif url.scheme == 'http':
    environ['SERVER_PORT'] = '80'
  environ['QUERY_STRING'] = url.query
  environ['SERVER_NAME'] = url.hostname
  if url.path:
    environ['PATH_INFO'] = urlparse.unquote(url.path)
  else:
    environ['PATH_INFO'] = '/'
  return environ
Profile a single function call.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/runtime/runtime.py/CgiDictFromParsedUrl--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/debug/profile.py/profile_decorator