[Modify] Polish it
This commit is contained in:
parent
9f19953490
commit
243e39927e
@ -536,10 +536,17 @@ namespace WebSocketSharp
|
|||||||
|
|
||||||
internal static bool IsToken (this string value)
|
internal static bool IsToken (this string value)
|
||||||
{
|
{
|
||||||
foreach (var c in value)
|
foreach (var c in value) {
|
||||||
if (c < 0x20 || c >= 0x7f || _tspecials.Contains (c))
|
if (c < 0x20)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (c >= 0x7f)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (_tspecials.Contains (c))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user