diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-01-30 06:03:41 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-01-30 06:03:41 +0100 |
commit | 179c3ae8aad4fdce70f734148f386c5a07414384 (patch) | |
tree | a5f1424e88ae1381f930ec1e03f3db58b899eb1c /libmproxy/protocol/http.py | |
parent | e00bbccfd6b0e2e4710db96bd133748eb594b10e (diff) | |
download | mitmproxy-179c3ae8aad4fdce70f734148f386c5a07414384.tar.gz mitmproxy-179c3ae8aad4fdce70f734148f386c5a07414384.tar.bz2 mitmproxy-179c3ae8aad4fdce70f734148f386c5a07414384.zip |
polish SimpleStateObject
Diffstat (limited to 'libmproxy/protocol/http.py')
-rw-r--r-- | libmproxy/protocol/http.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index 51e73010..4a3933e7 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -58,7 +58,6 @@ class decoded(object): self.o.encode(self.ce) - class BackreferenceMixin(object): """ If an attribute from the _backrefattr tuple is set, @@ -78,7 +77,7 @@ class BackreferenceMixin(object): assert (getattr(value, self._backrefname, self) or self) is self setattr(value, self._backrefname, self) - +# FIXME: Move out of http class Error(SimpleStateObject): """ An Error. @@ -107,7 +106,7 @@ class Error(SimpleStateObject): c = copy.copy(self) return c - +# FIXME: Move out of http class Flow(SimpleStateObject, BackreferenceMixin): def __init__(self, conntype, client_conn, server_conn, error): self.conntype = conntype @@ -167,6 +166,7 @@ class Flow(SimpleStateObject, BackreferenceMixin): self._load_state(self._backup) self._backup = None + class HTTPMessage(SimpleStateObject): def __init__(self): self.flow = None # Will usually set by backref mixin |