Skip to content

Commit 09ff739

Browse files
authored
Convert headers to text when serializing
Headers are also text and on Py2/Py3 should be treated as unicode/str instead of the str/bytes.
1 parent 93044a0 commit 09ff739

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cachecontrol/serialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def dumps(self, request, response, body=None):
6464
if u"vary" in response_headers:
6565
varied_headers = response_headers[u'vary'].split(',')
6666
for header in varied_headers:
67-
header = header.strip()
67+
header = text_type(header).strip()
6868
header_value = request.headers.get(header, None)
6969
if header_value is not None:
7070
header_value = text_type(header_value)

0 commit comments

Comments
 (0)