Improve SSL/HTTPS support

A minor change to improve SSL/HTTPS support