[MERGE] forward port branch 10.0 up to 2d46dbcbfd
This commit is contained in:
@@ -324,7 +324,7 @@ class IrHttp(models.AbstractModel):
|
||||
|
||||
# cache
|
||||
etag = hasattr(request, 'httprequest') and request.httprequest.headers.get('If-None-Match')
|
||||
retag = '"%s"' % hashlib.md5(last_update).hexdigest()
|
||||
retag = '"%s"' % hashlib.md5(content).hexdigest()
|
||||
status = status or (304 if etag == retag else 200)
|
||||
headers.append(('ETag', retag))
|
||||
headers.append(('Cache-Control', 'max-age=%s' % (STATIC_CACHE if unique else 0)))
|
||||
|
||||
Reference in New Issue
Block a user