[Modify] Polish it
This commit is contained in:
parent
fb1e0cdd04
commit
1cf3c988a9
@ -721,8 +721,9 @@ namespace WebSocketSharp.Net
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
schm = uri.Scheme;
|
schm = uri.Scheme;
|
||||||
var valid = (schm.StartsWith ("http") && !websocketRequest)
|
var valid = websocketRequest
|
||||||
|| (schm.StartsWith ("ws") && websocketRequest);
|
? schm == "ws" || schm == "wss"
|
||||||
|
: schm == "http" || schm == "https";
|
||||||
|
|
||||||
if (!valid)
|
if (!valid)
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user