aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/pathod.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-22 13:04:14 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-22 16:13:21 +0200
commitdc42e335058365ed7288463dcd8e5f61b03a87a2 (patch)
treed2254a7cd0492fab046a46237d980b5bb87e8cca /libpathod/pathod.py
parent6101d11d6ce412a19b542817bc8a7080a1f36758 (diff)
downloadmitmproxy-dc42e335058365ed7288463dcd8e5f61b03a87a2.tar.gz
mitmproxy-dc42e335058365ed7288463dcd8e5f61b03a87a2.tar.bz2
mitmproxy-dc42e335058365ed7288463dcd8e5f61b03a87a2.zip
fix bugs
Diffstat (limited to 'libpathod/pathod.py')
-rw-r--r--libpathod/pathod.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpathod/pathod.py b/libpathod/pathod.py
index 6f07ecc5..5c813cc5 100644
--- a/libpathod/pathod.py
+++ b/libpathod/pathod.py
@@ -85,7 +85,7 @@ class PathodHandler(tcp.BaseHandler):
self.use_http2 = False
self.http2_framedump = http2_framedump
- def _handle_sni(self, connection):
+ def handle_sni(self, connection):
self.sni = connection.get_servername()
def http_serve_crafted(self, crafted, logctx):
@@ -132,8 +132,8 @@ class PathodHandler(tcp.BaseHandler):
if isinstance(req, http.EmptyRequest):
return None, None
- if isinstance(req, http.ConnectRequest):
- return self.protocol.handle_http_connect([req.host, req.port, req.path], lg)
+ if req.method == 'CONNECT':
+ return self.protocol.handle_http_connect([req.host, req.port, req.httpversion], lg)
method = req.method
path = req.path
@@ -239,7 +239,7 @@ class PathodHandler(tcp.BaseHandler):
self.convert_to_ssl(
cert,
key,
- handle_sni=self._handle_sni,
+ handle_sni=self.handle_sni,
request_client_cert=self.server.ssloptions.request_client_cert,
cipher_list=self.server.ssloptions.ciphers,
method=self.server.ssloptions.ssl_version,