https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 244f93ec20c9995119384169f1d5ee1fac6a8fe9 authored by Robert Ma on 23 March 2018, 22:18:18 UTC
Fix some IDL tests after html.idl includes SVGElement
Tip revision: 244f93e
echo_raw_wsh.py
#!/usr/bin/python

from mod_pywebsocket import msgutil
import urllib


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 == 'exit':
            return
        request.connection.write(line.decode("string-escape"))
back to top