summaryrefslogtreecommitdiffstats
path: root/Lib/wsgiref
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-01-03 20:28:05 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-01-03 20:28:05 (GMT)
commita9ecbdade7271c30e691d8fab82085be68864624 (patch)
tree16d3cebebb4a37f3426f390e623dd6fe22b4ed6c /Lib/wsgiref
parent35b7e837abeee2085e912fe31d38f867664acbe2 (diff)
downloadcpython-a9ecbdade7271c30e691d8fab82085be68864624.zip
cpython-a9ecbdade7271c30e691d8fab82085be68864624.tar.gz
cpython-a9ecbdade7271c30e691d8fab82085be68864624.tar.bz2
Fix BytesWarning with -bb in wsgiref.headers.Headers.
Diffstat (limited to 'Lib/wsgiref')
-rw-r--r--Lib/wsgiref/headers.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/wsgiref/headers.py b/Lib/wsgiref/headers.py
index 83074af..4e0076c 100644
--- a/Lib/wsgiref/headers.py
+++ b/Lib/wsgiref/headers.py
@@ -73,7 +73,7 @@ class Headers:
Does *not* raise an exception if the header is missing.
"""
- name = name.lower()
+ name = self._convert_string_type(name.lower())
self._headers[:] = [kv for kv in self._headers if kv[0].lower() != name]
def __getitem__(self,name):
@@ -104,13 +104,13 @@ class Headers:
fields deleted and re-inserted are always appended to the header list.
If no fields exist with the given name, returns an empty list.
"""
- name = name.lower()
+ name = self._convert_string_type(name.lower())
return [kv[1] for kv in self._headers if kv[0].lower()==name]
def get(self,name,default=None):
"""Get the first header value for 'name', or return 'default'"""
- name = name.lower()
+ name = self._convert_string_type(name.lower())
for k,v in self._headers:
if k.lower()==name:
return v