|
|
|
@ -945,13 +945,11 @@ namespace WebSocketSharp
|
|
|
|
{
|
|
|
|
{
|
|
|
|
message = null;
|
|
|
|
message = null;
|
|
|
|
|
|
|
|
|
|
|
|
var invalid = protocols.Contains (
|
|
|
|
Func<string, bool> cond = protocol => protocol == null
|
|
|
|
protocol => protocol == null
|
|
|
|
|
|
|
|
|| protocol.Length == 0
|
|
|
|
|| protocol.Length == 0
|
|
|
|
|| !protocol.IsToken ()
|
|
|
|
|| !protocol.IsToken ();
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (invalid) {
|
|
|
|
if (protocols.Contains (cond)) {
|
|
|
|
message = "It contains an invalid value.";
|
|
|
|
message = "It contains an invalid value.";
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|