[Modify] Move it
This commit is contained in:
parent
e9f3e05fd2
commit
5e50439d4c
@ -224,9 +224,6 @@ namespace WebSocketSharp.Net
|
|||||||
var b = buffer[offset++];
|
var b = buffer[offset++];
|
||||||
_saved.Append ((char) b);
|
_saved.Append ((char) b);
|
||||||
|
|
||||||
if (_saved.Length > 4196)
|
|
||||||
throwProtocolViolation ("The trailer is too long.");
|
|
||||||
|
|
||||||
if (_trailerState == 1 || _trailerState == 3) { // CR or CR LF CR
|
if (_trailerState == 1 || _trailerState == 3) { // CR or CR LF CR
|
||||||
if (b != 10)
|
if (b != 10)
|
||||||
throwProtocolViolation ("LF is expected.");
|
throwProtocolViolation ("LF is expected.");
|
||||||
@ -248,6 +245,9 @@ namespace WebSocketSharp.Net
|
|||||||
_trailerState = 0;
|
_trailerState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_saved.Length > 4196)
|
||||||
|
throwProtocolViolation ("The trailer is too long.");
|
||||||
|
|
||||||
if (_trailerState < 4)
|
if (_trailerState < 4)
|
||||||
return InputChunkState.Trailer;
|
return InputChunkState.Trailer;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user