Moved code from kidux to  HttpUtils.isWebSocketUpgrade()