magic-removal: Merged to [1980]

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-01-15 06:22:58 +00:00
parent c86d34a935
commit 06309ba8fe
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ def patch_response_headers(response, cache_timeout=None):
now = datetime.datetime.utcnow()
expires = now + datetime.timedelta(0, cache_timeout)
if not response.has_header('ETag'):
response['ETag'] = md5.new(response.content).hexdigest()
response['ETag'] = md5.new(response.get_content_as_string('utf8')).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'):