def _execute(self, transforms, *args, **kwargs):

        def start_tunnel(future):
            """A callback which is called when connection to url is successful."""
            # We need upstream to write further messages
            self.upstream = future.result()
            # HTTPRequest needed for caching
            self.handshake_request = self.upstream_connection.request
            # Needed for websocket data & compliance with cache_handler stuff
            self.handshake_request.response_buffer = ''
            # Tiny hack to protect caching (according to websocket standards)
            self.handshake_request.version = 'HTTP/1.1'
            # XXX: I dont know why a None is coming
            self.handshake_request.body = self.handshake_request.body or ''
            # The regular procedures are to be done
            tornado.websocket.WebSocketHandler._execute(self, transforms, *args, **kwargs)

        # We try to connect to provided URL & then we proceed with connection on client side.
        self.upstream = self.upstream_connect(callback=start_tunnel)
Overrides the default whitespace chars
dataset/ETHPy150Open owtf/owtf/framework/http/proxy/proxy.py/CustomWebSocketHandler._execute--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/external/pyparsing/_pyparsing.py/ParserElement.setWhitespaceChars