Skip to content

Commit acc3a69

Browse files
committed
[Modify] Replace it
1 parent 74796b0 commit acc3a69

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

websocket-sharp/Net/HttpListenerRequest.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,9 @@ public bool IsSecureConnection {
278278
public bool IsWebSocketRequest {
279279
get {
280280
if (!_websocketRequestSet) {
281-
_websocketRequest = _method == "GET" &&
282-
_version > HttpVersion.Version10 &&
283-
_headers.Contains ("Upgrade", "websocket") &&
284-
_headers.Contains ("Connection", "Upgrade");
281+
_websocketRequest = _method == "GET"
282+
&& _version > HttpVersion.Version10
283+
&& this.IsUpgradeTo ("websocket");
285284

286285
_websocketRequestSet = true;
287286
}

0 commit comments

Comments
 (0)