aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/flow.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-09-03 23:44:54 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-09-03 23:44:54 +0200
commit2f44b26b4cd014e03dd62a125d79af9b81663a93 (patch)
tree732a02fe5d0283ccd98513bfaa2c8d65bb81dd54 /libmproxy/flow.py
parentcd43c5ba9c2981aeffee354cbcb574b6f5e435ba (diff)
downloadmitmproxy-2f44b26b4cd014e03dd62a125d79af9b81663a93.tar.gz
mitmproxy-2f44b26b4cd014e03dd62a125d79af9b81663a93.tar.bz2
mitmproxy-2f44b26b4cd014e03dd62a125d79af9b81663a93.zip
improve HTTPRequest syntax
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r--libmproxy/flow.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index eb183d9f..9115ec9d 100644
--- a/libmproxy/flow.py
+++ b/libmproxy/flow.py
@@ -260,8 +260,8 @@ class StickyCookieState:
Returns a (domain, port, path) tuple.
"""
return (
- m["domain"] or f.request.get_host(False, f),
- f.request.get_port(f),
+ m["domain"] or f.request.host,
+ f.request.port,
m["path"] or "/"
)
@@ -279,7 +279,7 @@ class StickyCookieState:
c = Cookie.SimpleCookie(str(i))
m = c.values()[0]
k = self.ckey(m, f)
- if self.domain_match(f.request.get_host(False, f), k[0]):
+ if self.domain_match(f.request.host, k[0]):
self.jar[self.ckey(m, f)] = m
def handle_request(self, f):
@@ -287,8 +287,8 @@ class StickyCookieState:
if f.match(self.flt):
for i in self.jar.keys():
match = [
- self.domain_match(f.request.get_host(False, f), i[0]),
- f.request.get_port(f) == i[1],
+ self.domain_match(f.request.host, i[0]),
+ f.request.port == i[1],
f.request.path.startswith(i[2])
]
if all(match):
@@ -307,7 +307,7 @@ class StickyAuthState:
self.hosts = {}
def handle_request(self, f):
- host = f.request.get_host(False, f)
+ host = f.request.host
if "authorization" in f.request.headers:
self.hosts[host] = f.request.headers["authorization"]
elif f.match(self.flt):