Threadsafety issues in WebScriptObject
[WebKit-https.git] / LayoutTests / http / tests / websocket / tests / hixie76 / bad-handshake-crash_wsh.py
1 from mod_pywebsocket import handshake
2
3
4 def web_socket_do_extra_handshake(request):
5     msg = "HTTP/1.1 101 WebSocket Protocol Handshake\r\n"
6     msg += "Upgrade: WebSocket\r\n"
7     msg += "Connection: Upgrade\r\n"
8     msg += "Sec-WebSocket-Location: " + request.ws_location + "\r\n"
9     msg += "Sec-WebSocket-Origin: " + request.ws_origin + "\r\n"
10     msg += "\xa5:\r\n"
11     msg += "\r\n"
12     msg += request.ws_challenge_md5
13     request.connection.write(msg)
14     print msg
15     raise handshake.AbortedByUserException("Abort the connection") # Prevents pywebsocket from sending its own handshake message.
16
17
18 def web_socket_transfer_data(request):
19     pass