From 9d66f9bc6757131c23fba58f060cb7e1d693dda7 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 10 Apr 2014 17:54:22 +0200 Subject: [PATCH] [ADD] checksum bzr revid: fme@openerp.com-20140410155422-dr2rg5z9l255g9zn --- addons/web/controllers/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index e110c396427..053abfe4cd2 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -612,7 +612,9 @@ class Home(http.Controller): bundle.last_modified if request.httprequest.if_modified_since and request.httprequest.if_modified_since >= bundle.last_modified: return werkzeug.wrappers.Response(status=304) - return request.make_response(bundle.js(), [('Content-Type', 'application/javascript')]) + return make_conditional( + request.make_response(bundle.js(), [('Content-Type', 'application/javascript')]), + bundle.last_modified, bundle.checksum) @http.route('/web/css/', type='http', auth='none') def css_bundle(self, xmlid, **kw): @@ -621,7 +623,9 @@ class Home(http.Controller): bundle = AssetsBundle(xmlid, assets_html) if request.httprequest.if_modified_since and request.httprequest.if_modified_since >= bundle.last_modified: return werkzeug.wrappers.Response(status=304) - return request.make_response(bundle.css(), [('Content-Type', 'text/css')]) + return make_conditional( + request.make_response(bundle.css(), [('Content-Type', 'text/css')]), + bundle.last_modified, bundle.checksum) class WebClient(http.Controller):