HTTPS fixes

Disambiguate SSL enabled.
Correctly set headers for HTTPS connections.