HTTPS support, fixes #58