move uri.lower() to is_secure_transport