summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/websockets/handlers/set-cookie-secure_wsh.py
blob: 052a88208443174d4faa80b5f0deb48db07e9bd0 (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; Secure; Path=/'))

def web_socket_transfer_data(request):
    # Expect close() from user agent.
    request.ws_stream.receive_message()