From bbe8205693733bf38edaf12fa84bd06a1a00bd64 Mon Sep 17 00:00:00 2001 From: Ɓukasz Langa Date: Wed, 27 Feb 2013 04:26:15 +0100 Subject: [py3] Always fed hashlib with bytes. --- django/utils/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/utils/cache.py') 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()) -- cgit v1.3