[Modify] Polish it
This commit is contained in:
parent
5e50439d4c
commit
5880514b23
@ -245,16 +245,18 @@ namespace WebSocketSharp.Net
|
|||||||
_trailerState = 0;
|
_trailerState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_saved.Length > 4196)
|
var len = _saved.Length;
|
||||||
|
|
||||||
|
if (len > 4196)
|
||||||
throwProtocolViolation ("The trailer is too long.");
|
throwProtocolViolation ("The trailer is too long.");
|
||||||
|
|
||||||
if (_trailerState < 4)
|
if (_trailerState < 4)
|
||||||
return InputChunkState.Trailer;
|
return InputChunkState.Trailer;
|
||||||
|
|
||||||
if (_saved.Length == 2)
|
if (len == 2)
|
||||||
return InputChunkState.End;
|
return InputChunkState.End;
|
||||||
|
|
||||||
_saved.Length -= 2;
|
_saved.Length = len - 2;
|
||||||
var reader = new StringReader (_saved.ToString ());
|
var reader = new StringReader (_saved.ToString ());
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
Loading…
Reference in New Issue
Block a user