blob: 5fe3ad9c57343ac797c384afb3a9659e5a6e0f70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/usr/bin/python
import urllib
def web_socket_do_extra_handshake(request):
url_parts = urllib.parse.urlsplit(request.uri)
request.extra_headers.append(('Set-Cookie', 'ws_test_'+(url_parts.query or '')+'=test; Path=/'))
def web_socket_transfer_data(request):
# Expect close from user agent.
request.ws_stream.receive_message()
|