Check that the received response is a WebSocket upgrade response and extracts the chosen subprotocol.