From cd5ef042bbbe3155efd29a749a7aefa52728f98e Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Thu, 16 Jun 2016 18:13:36 +0530 Subject: Py3: pathoc should send bytes over wire --- pathod/protocols/http.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pathod/protocols/http.py') diff --git a/pathod/protocols/http.py b/pathod/protocols/http.py index 7736df4b..9756c266 100644 --- a/pathod/protocols/http.py +++ b/pathod/protocols/http.py @@ -17,9 +17,9 @@ class HTTPProtocol(object): """ self.pathod_handler.wfile.write( - 'HTTP/1.1 200 Connection established\r\n' + - ('Proxy-agent: %s\r\n' % version.PATHOD) + - '\r\n' + b'HTTP/1.1 200 Connection established\r\n' + + (b'Proxy-agent: %s\r\n' % version.PATHOD.encode()) + + b'\r\n' ) self.pathod_handler.wfile.flush() if not self.pathod_handler.server.ssloptions.not_after_connect: -- cgit v1.2.3 From aa3d3290eeb1d79d8799f557f785fb559010fb52 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Thu, 16 Jun 2016 18:16:51 +0530 Subject: Py3: Send bytes to get_cert --- pathod/protocols/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pathod/protocols/http.py') diff --git a/pathod/protocols/http.py b/pathod/protocols/http.py index 9756c266..2ede2591 100644 --- a/pathod/protocols/http.py +++ b/pathod/protocols/http.py @@ -25,7 +25,7 @@ class HTTPProtocol(object): if not self.pathod_handler.server.ssloptions.not_after_connect: try: cert, key, chain_file_ = self.pathod_handler.server.ssloptions.get_cert( - connect[0] + connect[0].encode() ) self.pathod_handler.convert_to_ssl( cert, -- cgit v1.2.3