diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-08 15:16:25 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-08 15:16:25 +0200 |
commit | fc86bbd03e7806bf5d3dc0d226b607192642c810 (patch) | |
tree | e115ffbef1e097962c70b2fe6941d80574a79692 /netlib/http/semantics.py | |
parent | 50bf92ccce16efc4a76640577663383323bd3b86 (diff) | |
download | mitmproxy-fc86bbd03e7806bf5d3dc0d226b607192642c810.tar.gz mitmproxy-fc86bbd03e7806bf5d3dc0d226b607192642c810.tar.bz2 mitmproxy-fc86bbd03e7806bf5d3dc0d226b607192642c810.zip |
let Headers inherit from object
fixes mitmproxy/mitmproxy#753
Diffstat (limited to 'netlib/http/semantics.py')
-rw-r--r-- | netlib/http/semantics.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/netlib/http/semantics.py b/netlib/http/semantics.py index edf5fc07..5bb098a7 100644 --- a/netlib/http/semantics.py +++ b/netlib/http/semantics.py @@ -14,7 +14,7 @@ HDR_FORM_MULTIPART = "multipart/form-data" CONTENT_MISSING = 0 -class Headers(UserDict.DictMixin): +class Headers(object, UserDict.DictMixin): """ Header class which allows both convenient access to individual headers as well as direct access to the underlying raw data. Provides a full dictionary interface. @@ -135,7 +135,7 @@ class Headers(UserDict.DictMixin): def __ne__(self, other): return not self.__eq__(other) - def get_all(self, name, default=[]): + def get_all(self, name): """ Like :py:meth:`get`, but does not fold multiple headers into a single one. This is useful for Set-Cookie headers, which do not support folding. @@ -144,7 +144,7 @@ class Headers(UserDict.DictMixin): """ name = name.lower() values = [value for n, value in self.fields if n.lower() == name] - return values or default + return values def set_all(self, name, values): """ |