[Modify] Polish it

This commit is contained in:
sta 2017-10-02 17:32:10 +09:00
parent 9f19953490
commit 243e39927e

View File

@ -536,10 +536,17 @@ namespace WebSocketSharp
internal static bool IsToken (this string value)
{
foreach (var c in value)
if (c < 0x20 || c >= 0x7f || _tspecials.Contains (c))
foreach (var c in value) {
if (c < 0x20)
return false;
if (c >= 0x7f)
return false;
if (_tspecials.Contains (c))
return false;
}
return true;
}