| Index: net/data/websocket/echo-with-no-extension_wsh.py
|
| diff --git a/net/data/websocket/echo_wsh.py b/net/data/websocket/echo-with-no-extension_wsh.py
|
| similarity index 80%
|
| copy from net/data/websocket/echo_wsh.py
|
| copy to net/data/websocket/echo-with-no-extension_wsh.py
|
| index 86ab63c038f19618c3f8c1013144f00415f97394..a7dca019f4ed7079638e2dfcd9805e1afdfd2a93 100644
|
| --- a/net/data/websocket/echo_wsh.py
|
| +++ b/net/data/websocket/echo-with-no-extension_wsh.py
|
| @@ -2,8 +2,11 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +_GOODBYE_MESSAGE = u'Goodbye'
|
| +
|
| +
|
| def web_socket_do_extra_handshake(request):
|
| - pass # Always accept.
|
| + request.ws_extension_processors = []
|
|
|
|
|
| def web_socket_transfer_data(request):
|
| @@ -13,6 +16,7 @@ def web_socket_transfer_data(request):
|
| return
|
| if isinstance(line, unicode):
|
| request.ws_stream.send_message(line, binary=False)
|
| + if line == _GOODBYE_MESSAGE:
|
| + return
|
| else:
|
| request.ws_stream.send_message(line, binary=True)
|
| -
|
|
|