aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r--libmproxy/protocol/http.py5
-rw-r--r--libmproxy/protocol/primitives.py4
2 files changed, 6 insertions, 3 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index be60f374..636e1b07 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -56,7 +56,7 @@ class decoded(object):
class HTTPMessage(stateobject.SimpleStateObject):
def __init__(self):
- self.flow = None # Will usually set by backref mixin
+ self.flow = None # will usually be set by the flow backref mixin
"""@type: HTTPFlow"""
def get_decoded_content(self):
@@ -197,7 +197,7 @@ class HTTPRequest(HTTPMessage):
timestamp_end: Timestamp indicating when request transmission ended
"""
def __init__(self, form_in, method, scheme, host, port, path, httpversion, headers, content,
- timestamp_start, timestamp_end, form_out=None):
+ timestamp_start=None, timestamp_end=None, form_out=None):
assert isinstance(headers, ODictCaseless) or not headers
HTTPMessage.__init__(self)
@@ -758,7 +758,6 @@ class HTTPFlow(Flow):
"""
Continue with the flow - called after an intercept().
"""
- assert self.intercepting
if self.request:
if not self.request.reply.acked:
self.request.reply()
diff --git a/libmproxy/protocol/primitives.py b/libmproxy/protocol/primitives.py
index f77e097b..f3fdd245 100644
--- a/libmproxy/protocol/primitives.py
+++ b/libmproxy/protocol/primitives.py
@@ -41,6 +41,7 @@ class Error(stateobject.SimpleStateObject):
@type msg: str
@type timestamp: float
"""
+ self.flow = None # will usually be set by the flow backref mixin
self.msg = msg
self.timestamp = timestamp or utils.timestamp()
@@ -88,6 +89,9 @@ class Flow(stateobject.SimpleStateObject, _BackreferenceMixin):
f._load_state(state)
return f
+ def __eq__(self, other):
+ return self is other
+
def copy(self):
f = copy.copy(self)