Graphics protocol: Clear any partially uploaded data for a chunked load when any delete command is received

Fixes #7968
This commit is contained in:
Kovid Goyal
2024-10-13 09:49:44 +05:30
parent b07d4059d3
commit 70d72b22d8
3 changed files with 15 additions and 0 deletions

View File

@@ -410,6 +410,17 @@ class TestGraphics(BaseTest):
img = g.image_for_client_id(1)
self.ae(img['data'], b'abcdefghijklmnop')
# Test interrupted and retried chunked load
self.assertIsNone(pl('abcd', s=2, v=2, m=1))
self.assertIsNone(pl('efgh', m=1))
send_command(s, 'a=d') # delete command should clear partial transfer
self.assertIsNone(pl('abcd', s=2, v=2, m=1))
self.assertIsNone(pl('efgh', m=1))
self.assertIsNone(pl('ijkl', m=1))
self.ae(pl('1234', m=0), 'OK')
img = g.image_for_client_id(1)
self.ae(img['data'], b'abcdefghijkl1234')
random_data = byte_block(32 * 1024)
sl(
random_data,