diff --git a/libpathod/language/http.py b/libpathod/language/http.py index 3c9df484a..0c4d9419b 100644 --- a/libpathod/language/http.py +++ b/libpathod/language/http.py @@ -194,7 +194,7 @@ class Response(_HTTPMessage): 1, Code(101) ) - hdrs = netlib.websockets.server_handshake_headers( + hdrs = netlib.websockets.WebsocketsProtocol.server_handshake_headers( settings.websocket_key ) for i in hdrs.lst: @@ -306,7 +306,7 @@ class Request(_HTTPMessage): 1, Method("get") ) - for i in netlib.websockets.client_handshake_headers().lst: + for i in netlib.websockets.WebsocketsProtocol.client_handshake_headers().lst: if not get_header(i[0], self.headers): tokens.append( Header( diff --git a/libpathod/pathod.py b/libpathod/pathod.py index 148fa7b24..daad64be3 100644 --- a/libpathod/pathod.py +++ b/libpathod/pathod.py @@ -280,7 +280,7 @@ class PathodHandler(tcp.BaseHandler): retlog["cipher"] = self.get_current_cipher() m = utils.MemBool() - websocket_key = websockets.check_client_handshake(headers) + websocket_key = websockets.WebsocketsProtocol.check_client_handshake(headers) self.settings.websocket_key = websocket_key # If this is a websocket initiation, we respond with a proper