summaryrefslogtreecommitdiff
path: root/django/utils/cache.py
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2013-02-27 04:26:15 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-02-27 10:03:33 +0100
commitbbe8205693733bf38edaf12fa84bd06a1a00bd64 (patch)
tree221b7fd1a8947af226d1fe93438fd66c81a73790 /django/utils/cache.py
parent67f3a6e9cfe98b9376f90fc1b6f980570f3bcaa9 (diff)
[py3] Always fed hashlib with bytes.
Diffstat (limited to 'django/utils/cache.py')
-rw-r--r--django/utils/cache.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/cache.py b/django/utils/cache.py
index 0fceaa96e6..ecf0f831b2 100644
--- a/django/utils/cache.py
+++ b/django/utils/cache.py
@@ -181,7 +181,7 @@ def _generate_cache_key(request, method, headerlist, key_prefix):
for header in headerlist:
value = request.META.get(header, None)
if value is not None:
- ctx.update(value)
+ ctx.update(force_bytes(value))
path = hashlib.md5(force_bytes(iri_to_uri(request.get_full_path())))
cache_key = 'views.decorators.cache.cache_page.%s.%s.%s.%s' % (
key_prefix, method, path.hexdigest(), ctx.hexdigest())