[Modify] Polish it
This commit is contained in:
parent
45a72e9b88
commit
a08b29ff1c
@ -839,7 +839,12 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
value = value.Trim ();
|
value = value.Trim ();
|
||||||
|
|
||||||
if (value.Length > 65535) {
|
var len = value.Length;
|
||||||
|
|
||||||
|
if (len == 0)
|
||||||
|
return value;
|
||||||
|
|
||||||
|
if (len > 65535) {
|
||||||
var msg = "The length is greater than 65,535 characters.";
|
var msg = "The length is greater than 65,535 characters.";
|
||||||
|
|
||||||
throw new ArgumentOutOfRangeException ("value", msg);
|
throw new ArgumentOutOfRangeException ("value", msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user