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:02:07 +0100
commit40b9f4fb8bc9140876be7ab539c30e613a8898ee (patch)
tree7f160f7a229e41a1d7c668eb96d12f632140ffbf /django/utils/cache.py
parenta28e2e7c4d84a94ad8c243cbca53786bd7e60971 (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 8f111592c4..917949d4d3 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())