Fix utf8 check for compressed frames

This commit is contained in:
Vinnie Falco
2017-08-15 16:33:25 -07:00
parent a435dde2a3
commit 3d6a009a96
2 changed files with 3 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ Version 107:
WebSocket
* Fix done state for WebSocket reads
* Fix utf8 check for compressed frames
--------------------------------------------------------------------------------

View File

@@ -543,8 +543,7 @@ operator()(
// check utf8
if(! ws_.rd_.utf8.write(
buffer_prefix(bytes_written_, cb_.get())) || (
ws_.rd_.remain == 0 && ws_.rd_.fh.fin &&
! ws_.rd_.utf8.finish()))
ws_.rd_.done && ! ws_.rd_.utf8.finish()))
{
// _Fail the WebSocket Connection_
code = close_code::bad_payload;
@@ -1241,8 +1240,7 @@ loop:
// check utf8
if(! rd_.utf8.write(
buffer_prefix(bytes_written, buffers)) || (
rd_.remain == 0 && rd_.fh.fin &&
! rd_.utf8.finish()))
rd_.done && ! rd_.utf8.finish()))
{
// _Fail the WebSocket Connection_
do_fail(