Index: third_party/grpc/src/python/grpcio/grpc/framework/foundation/abandonment.py |
diff --git a/third_party/WebKit/LayoutTests/http/tests/websocket/no-query_wsh.py b/third_party/grpc/src/python/grpcio/grpc/framework/foundation/abandonment.py |
similarity index 81% |
copy from third_party/WebKit/LayoutTests/http/tests/websocket/no-query_wsh.py |
copy to third_party/grpc/src/python/grpcio/grpc/framework/foundation/abandonment.py |
index 2b796155de3352eefaea8b29660bf865e84509da..960b4d06b49c2b7b5fbda2e81a55c3ab246b9698 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/websocket/no-query_wsh.py |
+++ b/third_party/grpc/src/python/grpcio/grpc/framework/foundation/abandonment.py |
@@ -1,4 +1,5 @@ |
-# Copyright (C) 2009 Google Inc. All rights reserved. |
+# Copyright 2015, Google Inc. |
+# All rights reserved. |
# |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions are |
@@ -26,13 +27,12 @@ |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+"""Utilities for indicating abandonment of computation.""" |
-from mod_pywebsocket import msgutil |
+class Abandoned(Exception): |
+ """Indicates that some computation is being abandoned. |
-def web_socket_do_extra_handshake(request): |
- request.ws_location = request.ws_resource.split('?', 1)[0] |
- |
- |
-def web_socket_transfer_data(request): |
- msgutil.send_message(request, request.ws_location) |
+ Abandoning a computation is different than returning a value or raising |
+ an exception indicating some operational or programming defect. |
+ """ |