From 243e39927ee31ff84dd2d443df300b4c9bfc1283 Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 2 Oct 2017 17:32:10 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Ext.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 3db99a99..100c08e3 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -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; }