From 44fdcb4b8291a5be6738f32d6fde307af3f2034e Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 1 Jun 2016 11:12:10 +1200 Subject: Reorganise netlib imports according to Google Style Guide --- netlib/websockets/protocol.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'netlib/websockets/protocol.py') diff --git a/netlib/websockets/protocol.py b/netlib/websockets/protocol.py index 101d5484..c1b7be2c 100644 --- a/netlib/websockets/protocol.py +++ b/netlib/websockets/protocol.py @@ -19,7 +19,8 @@ import hashlib import os import six -from ..http import Headers + +from netlib import http websockets_magic = b'258EAFA5-E914-47DA-95CA-C5AB0DC85B11' VERSION = "13" @@ -72,11 +73,11 @@ class WebsocketsProtocol(object): specified, it is generated, and can be found in sec-websocket-key in the returned header set. - Returns an instance of Headers + Returns an instance of http.Headers """ if not key: key = base64.b64encode(os.urandom(16)).decode('ascii') - return Headers( + return http.Headers( sec_websocket_key=key, sec_websocket_version=version, connection="Upgrade", @@ -88,7 +89,7 @@ class WebsocketsProtocol(object): """ The server response is a valid HTTP 101 response. """ - return Headers( + return http.Headers( sec_websocket_accept=self.create_server_nonce(key), connection="Upgrade", upgrade="websocket" -- cgit v1.2.3