[Modify] Polish it

This commit is contained in:
sta 2021-03-10 19:35:27 +09:00
parent 8058f23f96
commit 99ded81873

View File

@ -231,7 +231,7 @@ namespace WebSocketSharp.Net
}
while (offset < length) {
if (_trailerState == 4)
if (_trailerState == 4) // CR LF CR LF
break;
var b = buffer[offset++];
@ -240,7 +240,7 @@ namespace WebSocketSharp.Net
if (_saved.Length > 4196)
throwProtocolViolation ("The trailer is too long.");
if (_trailerState == 1 || _trailerState == 3) {
if (_trailerState == 1 || _trailerState == 3) { // CR or CR LF CR
if (b != 10)
throwProtocolViolation ("LF is expected.");