summaryrefslogtreecommitdiff
path: root/django/utils/cache.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-04-09 23:54:34 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-04-09 23:54:34 +0000
commitbc4638d722c0e48cfd6bc4d8084b41445f987004 (patch)
tree3fa74811a9275d242c8f4808571abd95fe801e74 /django/utils/cache.py
parentb0a60c186ee2a5564b5fa897b994e4ff2b7ad5b2 (diff)
downloaddjango-bc4638d722c0e48cfd6bc4d8084b41445f987004.tar.gz
Fixed #1569 -- HttpResponse now accepts iterators. Thanks, Maniac
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
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 7c7a41bafa..b888cef179 100644
--- a/django/utils/cache.py
+++ b/django/utils/cache.py
@@ -74,7 +74,7 @@ def patch_response_headers(response, cache_timeout=None):
cache_timeout = settings.CACHE_MIDDLEWARE_SECONDS
now = datetime.datetime.utcnow()
if not response.has_header('ETag'):
- response['ETag'] = md5.new(response.get_content_as_string('utf8')).hexdigest()
+ response['ETag'] = md5.new(response.content).hexdigest()
if not response.has_header('Last-Modified'):
response['Last-Modified'] = now.strftime('%a, %d %b %Y %H:%M:%S GMT')
if not response.has_header('Expires'):