diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-07-02 05:37:22 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-07-02 05:37:22 (GMT) |
commit | 3e887222aa758ac5a3fb61c8e77e909372462d00 (patch) | |
tree | f9f849ce560197cb1de6bffb09be692c3cae0e1f /Lib/wsgiref | |
parent | 09db75fcd64ea5056622ae744d31f494e719cd19 (diff) | |
download | cpython-3e887222aa758ac5a3fb61c8e77e909372462d00.zip cpython-3e887222aa758ac5a3fb61c8e77e909372462d00.tar.gz cpython-3e887222aa758ac5a3fb61c8e77e909372462d00.tar.bz2 |
Issue #5800: headers parameter of wsgiref.headers.Headers is now optional.
Patch by Pablo Torres Navarrete and SilentGhost.
Diffstat (limited to 'Lib/wsgiref')
-rw-r--r-- | Lib/wsgiref/headers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/wsgiref/headers.py b/Lib/wsgiref/headers.py index d939628..7931bc7 100644 --- a/Lib/wsgiref/headers.py +++ b/Lib/wsgiref/headers.py @@ -26,10 +26,10 @@ def _formatparam(param, value=None, quote=1): class Headers: - """Manage a collection of HTTP response headers""" - def __init__(self,headers): + def __init__(self, headers=None): + headers = headers if headers is not None else [] if type(headers) is not list: raise TypeError("Headers must be a list of name/value tuples") self._headers = headers |