diff options
-rw-r--r-- | test/test_asgi_websockets.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_asgi_websockets.py b/test/test_asgi_websockets.py index 249f630f..cbd77109 100644 --- a/test/test_asgi_websockets.py +++ b/test/test_asgi_websockets.py @@ -128,6 +128,18 @@ class TestASGIWebsockets(TestApplicationPython): sock.close() + def test_asgi_websockets_length_long(self): + self.load('websockets/mirror') + + _, sock, _ = self.ws.upgrade() + + self.ws.frame_write(sock, self.ws.OP_TEXT, 'fragment1', fin=False) + self.ws.frame_write( + sock, self.ws.OP_CONT, 'fragment2', length=2**64 - 1 + ) + + self.check_close(sock, 1009) # 1009 - CLOSE_TOO_LARGE + def test_asgi_websockets_frame_fragmentation_invalid(self): self.load('websockets/mirror') |