[Modify] Replace it

This commit is contained in:
sta 2020-01-02 22:01:22 +09:00
parent 590674929e
commit 74fdd0e688

View File

@ -743,12 +743,7 @@ namespace WebSocketSharp.Net
return;
}
if (!value.IsText ()) {
var msg = "It contains an invalid character.";
throw new ArgumentException (msg, "value");
}
if (value.IndexOfAny (new[] { '\r', '\n' }) > -1) {
if (!value.IsPrintable ()) {
var msg = "It contains an invalid character.";
throw new ArgumentException (msg, "value");
}