better detection of HTTPS