From d5946c5946091599c8fc2bcb2c528d22a79102a5 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 16 May 2007 22:23:36 +0000 Subject: [PATCH] unicode: Found a str() call that had snuck through the cracks. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5268 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/utils/cache.py b/django/utils/cache.py index c8031a409a..5b90ca291f 100644 --- a/django/utils/cache.py +++ b/django/utils/cache.py @@ -20,6 +20,7 @@ A example: i18n middleware would need to distinguish caches by the import datetime, md5, re from django.conf import settings from django.core.cache import cache +from django.utils.encoding import smart_str cc_delim_re = re.compile(r'\s*,\s*') @@ -46,7 +47,7 @@ def patch_cache_control(response, **kwargs): if t[1] == True: return t[0] else: - return t[0] + '=' + str(t[1]) + return t[0] + '=' + smart_str(t[1]) if response.has_header('Cache-Control'): cc = cc_delim_re.split(response['Cache-Control'])