Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / websocket / handshake-fail-by-no-upgrade-header_wsh.py
bloba98c48e21168c8dbeb79ac5203333c73a81fd98d
1 from mod_pywebsocket import handshake
2 from mod_pywebsocket.handshake.hybi import compute_accept
5 def web_socket_do_extra_handshake(request):
6 msg = 'HTTP/1.1 101 Switching Protocols\r\n'
7 # Missing 'Upgrade: websocket\r\n'
8 msg += 'Connection: Upgrade\r\n'
9 msg += 'Sec-WebSocket-Accept: %s\r\n' % compute_accept(request.headers_in['Sec-WebSocket-Key'])[0]
10 msg += '\r\n'
11 request.connection.write(msg)
12 print msg
13 # Prevents pywebsocket from sending its own handshake message.
14 raise handshake.AbortedByUserException('Abort the connection')
17 def web_socket_transfer_data(request):
18 pass