From f2097b47ce6c88e2bef0889fb7e7d52b63158082 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Sat, 30 Jan 2016 22:05:23 +0100 Subject: fix race condition during state loading PyPy and Python2.7 might process the state attributes in different order. --- libmproxy/models/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmproxy/models/http.py') 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, -- cgit v1.2.3