[MERGE] forward port branch 10.0 up to 2d46dbcbfd

This commit is contained in:
Christophe Simonis
2017-10-18 14:57:25 +02:00
+1 -1
View File
@@ -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)))