mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #5800: headers parameter of wsgiref.headers.Headers is now optional.
Patch by Pablo Torres Navarrete and SilentGhost.
This commit is contained in:
parent
09db75fcd6
commit
3e887222aa
5 changed files with 21 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue