'Execute hypervisor-specific vnc auth handshaking (if needed).'

def handshake(self, req, connect_info, sockets):

    host = connect_info['host']
    port = int(connect_info['port'])
    server = eventlet.connect((host, port))
    if connect_info.get('internal_access_path'):
        server.sendall(('CONNECT    %s    HTTP/1.1\r\n\r\n' % connect_info['internal_access_path']))
        data = ''
        while True:
            b = server.recv(1)
            if b:
                data += b
                if (data.find('\r\n\r\n') != (-1)):
                    if (not data.split('\r\n')[0].find('200')):
                        LOG.info(_LI('Error    in    handshake    format:    %s'), data)
                        return
                    break
            if ((not b) or (len(data) > 4096)):
                LOG.info(_LI('Error    in    handshake:    %s'), data)
                return
    client = req.environ['eventlet.input'].get_socket()
    client.sendall('HTTP/1.1    200    OK\r\n\r\n')
    sockets['client'] = client
    sockets['server'] = server
