Ticket #3206: etag_304.diff
File etag_304.diff, 625 bytes (added by , 18 years ago) |
---|
-
django/middleware/common.py
73 73 # Use ETags, if requested. 74 74 if settings.USE_ETAGS: 75 75 etag = md5.new(response.content).hexdigest() 76 if request.META.get('HTTP_IF_NONE_MATCH') == etag:76 if (response.status_code == 200) and (request.META.get('HTTP_IF_NONE_MATCH') == etag): 77 77 response = http.HttpResponseNotModified() 78 78 else: 79 79 response['ETag'] = etag