Modified to better detect websocket request from firefox