[mod_python] Distinguish HTTP and HTTPS

Dustin Mitchell dustin at ywlcs.org
Sun Mar 3 09:28:12 EST 2002


Best way I've found to distinguish the two is to look at the port number:

def is_secure(req):
  # This seems the best way to do this
  return req.server.port == 443

Dustin

-- 

  Dustin Mitchell
  dustin at ywlcs.org



More information about the Mod_python mailing list