diff options
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/models/http.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libmproxy/models/http.py b/libmproxy/models/http.py index a52597b4..8a0b226d 100644 --- a/libmproxy/models/http.py +++ b/libmproxy/models/http.py @@ -14,6 +14,10 @@ from .flow import Flow from collections import OrderedDict class MessageMixin(stateobject.StateObject): + # The restoration order is important currently, e.g. because + # of .content setting .headers["content-length"] automatically. + # Using OrderedDict is the short term fix, restoring state should + # be implemented without side-effects again. _stateobject_attributes = OrderedDict( http_version=bytes, headers=Headers, |