Fixed #3206 -- Fixed typo in [5407]. This time with bonus testing. Thanks,
Manuel Saelices. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5417 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4d9ab5435c
commit
7de9f79969
|
@ -75,7 +75,7 @@ class CommonMiddleware(object):
|
||||||
# Use ETags, if requested.
|
# Use ETags, if requested.
|
||||||
if settings.USE_ETAGS:
|
if settings.USE_ETAGS:
|
||||||
etag = md5.new(response.content).hexdigest()
|
etag = md5.new(response.content).hexdigest()
|
||||||
if response.status_code >= 200 and response.status_code < 300 and response.statusrequest.META.get('HTTP_IF_NONE_MATCH') == etag:
|
if response.status_code >= 200 and response.status_code < 300 and request.META.get('HTTP_IF_NONE_MATCH') == etag:
|
||||||
response = http.HttpResponseNotModified()
|
response = http.HttpResponseNotModified()
|
||||||
else:
|
else:
|
||||||
response['ETag'] = etag
|
response['ETag'] = etag
|
||||||
|
|
Loading…
Reference in New Issue