Ticket #12789: django-12789.patch
File django-12789.patch, 612 bytes (added by , 14 years ago) |
---|
-
django/utils/cache.py
=== modified file 'django/utils/cache.py'
101 101 cache_timeout = settings.CACHE_MIDDLEWARE_SECONDS 102 102 if cache_timeout < 0: 103 103 cache_timeout = 0 # Can't have max-age negative 104 if not response.has_header('ETag'):104 if 200 <= response.status_code < 300 and not response.has_header('ETag'): 105 105 response['ETag'] = '"%s"' % md5_constructor(response.content).hexdigest() 106 106 if not response.has_header('Last-Modified'): 107 107 response['Last-Modified'] = http_date()