add HTTPS->WS upgrade support