Alexey: fixed a major big with WebSocket handshake memory management.