diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-01-30 22:05:23 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-02-04 09:52:28 +0100 |
commit | f2097b47ce6c88e2bef0889fb7e7d52b63158082 (patch) | |
tree | 2e9be58ec7f799bb59dcc07fa4745d4efdb5a7f7 /libmproxy | |
parent | 6d3b3994e27b3cd97c74612bc64c7e0457aeb448 (diff) | |
download | mitmproxy-f2097b47ce6c88e2bef0889fb7e7d52b63158082.tar.gz mitmproxy-f2097b47ce6c88e2bef0889fb7e7d52b63158082.tar.bz2 mitmproxy-f2097b47ce6c88e2bef0889fb7e7d52b63158082.zip |
fix race condition during state loading
PyPy and Python2.7 might process the state attributes in different order.
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/models/http.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmproxy/models/http.py b/libmproxy/models/http.py index 3914440e..a52597b4 100644 --- a/libmproxy/models/http.py +++ b/libmproxy/models/http.py @@ -11,9 +11,10 @@ from netlib.tcp import Address from .. import version, stateobject from .flow import Flow +from collections import OrderedDict class MessageMixin(stateobject.StateObject): - _stateobject_attributes = dict( + _stateobject_attributes = OrderedDict( http_version=bytes, headers=Headers, timestamp_start=float, |