From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../tests/websockets/handlers/echo_raw_wsh.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 testing/web-platform/tests/websockets/handlers/echo_raw_wsh.py (limited to 'testing/web-platform/tests/websockets/handlers/echo_raw_wsh.py') diff --git a/testing/web-platform/tests/websockets/handlers/echo_raw_wsh.py b/testing/web-platform/tests/websockets/handlers/echo_raw_wsh.py new file mode 100755 index 0000000000..e1fc26608f --- /dev/null +++ b/testing/web-platform/tests/websockets/handlers/echo_raw_wsh.py @@ -0,0 +1,16 @@ +#!/usr/bin/python + +from mod_pywebsocket import msgutil + + +def web_socket_do_extra_handshake(request): + pass # Always accept. + +def web_socket_transfer_data(request): + while True: + line = msgutil.receive_message(request) + if line == b'exit': + return + + if line is not None: + request.connection.write(line) -- cgit v1.2.3