Oops, fix websockets.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4721 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
197fca6d3b
commit
e4cd5312f1
@ -308,9 +308,12 @@ static void _http_add_body_bytes(tf_http_connection_t* connection, const void* d
|
||||
connection->fragment_length = 0;
|
||||
}
|
||||
connection->websocket_message_index++;
|
||||
if (connection->body_length > total_length)
|
||||
if (connection->body_length >= total_length)
|
||||
{
|
||||
memmove(connection->body, (char*)connection->body + total_length, connection->body_length - total_length);
|
||||
if (connection->body_length > total_length)
|
||||
{
|
||||
memmove(connection->body, (char*)connection->body + total_length, connection->body_length - total_length);
|
||||
}
|
||||
connection->body_length -= total_length;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user