Adding support for web socket and protocol upgrade