Commit 7061b26d authored by tyoshino@chromium.org's avatar tyoshino@chromium.org

Update net/data/websocket/close-code-and-reason_wsh.py

Sync with one in the LayoutTests directory to include the code to
wait for a close frame from the client.

BUG=396399
R=jgraettinger,ricea

Review URL: https://codereview.chromium.org/415953003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285497 0039d316-1c4b-4281-b951-d872f2087c98
parent 0701830a
...@@ -23,3 +23,6 @@ def web_socket_transfer_data(request): ...@@ -23,3 +23,6 @@ def web_socket_transfer_data(request):
code, reason = line.split(' ', 1) code, reason = line.split(' ', 1)
data = struct.pack('!H', int(code)) + reason.encode('utf-8') data = struct.pack('!H', int(code)) + reason.encode('utf-8')
request.connection.write(stream.create_close_frame(data)) request.connection.write(stream.create_close_frame(data))
request.server_terminated = True
# Wait for Close frame from client.
request.ws_stream.receive_message()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment