mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #1569 -- HttpResponse now accepts iterators. Thanks, Maniac
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user