Values can be none #433

This commit is contained in:
Kenneth Reitz
2012-02-20 12:30:12 -05:00
parent fe10eeb5be
commit 4f75f1f41d
+2
View File
@@ -154,6 +154,8 @@ def header_expand(headers):
# latin-1 is the most conservative encoding used on the web. Anyone
# who needs more can encode to a byte-string before calling
return headers.encode("latin-1")
elif headers is None:
return headers
for i, (value, params) in enumerate(headers):