From 8cdd7e4b89a09ffcd6ce8a697d36037bdbb3a571 Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 23 Dec 2017 16:51:11 +0900 Subject: [PATCH] [Modify] Replace it --- websocket-sharp/HttpResponse.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/websocket-sharp/HttpResponse.cs b/websocket-sharp/HttpResponse.cs index 111a0d92..831b7278 100644 --- a/websocket-sharp/HttpResponse.cs +++ b/websocket-sharp/HttpResponse.cs @@ -104,11 +104,9 @@ namespace WebSocketSharp public bool IsWebSocketResponse { get { - var headers = Headers; - return ProtocolVersion > HttpVersion.Version10 && - _code == "101" && - headers.Contains ("Upgrade", "websocket") && - headers.Contains ("Connection", "Upgrade"); + return ProtocolVersion > HttpVersion.Version10 + && _code == "101" + && Headers.Upgrades ("websocket"); } }