server.py: HTTPS crash bug fix