mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
[py3] Always fed hashlib with bytes.
This commit is contained in:
committed by
Aymeric Augustin
parent
a28e2e7c4d
commit
40b9f4fb8b
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user