websockets_handshake -> websocket_handshake
The plural feels awkward.
This commit is contained in:
parent
b0add569b9
commit
b735694653
|
@ -128,7 +128,7 @@ HTTP Events
|
|||
WebSockets Events
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. py:function:: websockets_handshake(context, flow)
|
||||
.. py:function:: websocket_handshake(context, flow)
|
||||
|
||||
Called when a client wants to establish a WebSockets connection.
|
||||
The WebSockets-specific headers can be manipulated to manipulate the handshake.
|
||||
|
|
|
@ -28,7 +28,7 @@ Events = frozenset([
|
|||
"response",
|
||||
"responseheaders",
|
||||
|
||||
"websockets_handshake",
|
||||
"websocket_handshake",
|
||||
|
||||
"next_layer",
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ class FlowMaster(controller.Master):
|
|||
self.state.update_flow(f)
|
||||
|
||||
@controller.handler
|
||||
def websockets_handshake(self, f):
|
||||
def websocket_handshake(self, f):
|
||||
pass
|
||||
|
||||
def handle_intercept(self, f):
|
||||
|
|
|
@ -200,7 +200,7 @@ class HttpLayer(base.Layer):
|
|||
if websockets.check_handshake(request.headers) and websockets.check_client_version(request.headers):
|
||||
# We only support RFC6455 with WebSockets version 13
|
||||
# allow inline scripts to manipulate the client handshake
|
||||
self.channel.ask("websockets_handshake", flow)
|
||||
self.channel.ask("websocket_handshake", flow)
|
||||
|
||||
if not flow.response:
|
||||
self.establish_server_connection(
|
||||
|
|
|
@ -174,12 +174,12 @@ class PathodHandler(tcp.BaseHandler):
|
|||
|
||||
m = utils.MemBool()
|
||||
|
||||
valid_websockets_handshake = websockets.check_handshake(headers)
|
||||
valid_websocket_handshake = websockets.check_handshake(headers)
|
||||
self.settings.websocket_key = websockets.get_client_key(headers)
|
||||
|
||||
# If this is a websocket initiation, we respond with a proper
|
||||
# server response, unless over-ridden.
|
||||
if valid_websockets_handshake:
|
||||
if valid_websocket_handshake:
|
||||
anchor_gen = language.parse_pathod("ws")
|
||||
else:
|
||||
anchor_gen = None
|
||||
|
@ -226,7 +226,7 @@ class PathodHandler(tcp.BaseHandler):
|
|||
spec,
|
||||
lg
|
||||
)
|
||||
if nexthandler and valid_websockets_handshake:
|
||||
if nexthandler and valid_websocket_handshake:
|
||||
self.protocol = protocols.websockets.WebsocketsProtocol(self)
|
||||
return self.protocol.handle_websocket, retlog
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue