res_http_websocket: Fix faulty read logic.