mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
url-rewrite cookie store: decode() only if redis returns byte strings in py3
This commit is contained in:
parent
2cc6f5b4d6
commit
bb64d0de54
@ -42,8 +42,10 @@ class CookieTracker(object):
|
||||
continue
|
||||
|
||||
for n, v in six.iteritems(res):
|
||||
n = n.decode('utf-8')
|
||||
v = v.decode('utf-8')
|
||||
if six.PY3 and type(n) == six.binary_type:
|
||||
n = n.decode('utf-8')
|
||||
v = v.decode('utf-8')
|
||||
|
||||
full = n + '=' + v
|
||||
cookies.append(full.split(';')[0])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user