From 3a9e03ea1eaacd8b8428500578831d2b355a1522 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 28 May 2016 13:04:34 +1200 Subject: [PATCH] Fix crash in mitmproxy when viewing responses --- netlib/multidict.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netlib/multidict.py b/netlib/multidict.py index 248acdec0..8e657363f 100644 --- a/netlib/multidict.py +++ b/netlib/multidict.py @@ -213,7 +213,9 @@ class _MultiDict(MutableMapping, Serializable): class MultiDict(_MultiDict): def __init__(self, fields=None): super(MultiDict, self).__init__() - self.fields = tuple(fields) if fields else tuple() # type: Tuple[Tuple[bytes, bytes], ...] + self.fields = tuple( + [tuple(i) for i in fields or ()] + ) @six.add_metaclass(ABCMeta)