1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +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:
Adrian Holovaty
2006-04-09 23:54:34 +00:00
parent b0a60c186e
commit bc4638d722
7 changed files with 43 additions and 21 deletions

View File

@@ -67,7 +67,7 @@ class CommonMiddleware:
# Use ETags, if requested.
if settings.USE_ETAGS:
etag = md5.new(response.get_content_as_string(settings.DEFAULT_CHARSET)).hexdigest()
etag = md5.new(response.content).hexdigest()
if request.META.get('HTTP_IF_NONE_MATCH') == etag:
response = httpwrappers.HttpResponseNotModified()
else: