adding support for http upgrades