From e7c4720a0482e0622597ac23f7099b4ddec9b60d Mon Sep 17 00:00:00 2001 From: Mathias Markl Date: Sun, 21 Jan 2018 14:46:52 +0100 Subject: [PATCH] test --- muk_fields_lobject/controllers/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/muk_fields_lobject/controllers/main.py b/muk_fields_lobject/controllers/main.py index 80914ae..1047357 100644 --- a/muk_fields_lobject/controllers/main.py +++ b/muk_fields_lobject/controllers/main.py @@ -32,7 +32,6 @@ from odoo import tools from odoo import http from odoo.http import request from odoo.http import Response -from odoo.tools import pycompat from odoo.exceptions import AccessError _logger = logging.getLogger(__name__) @@ -71,7 +70,7 @@ class LargeObjectController(http.Controller): mimetype = mimetypes.guess_type(filename)[0] headers += [('Content-Type', mimetype), ('X-Content-Type-Options', 'nosniff')] etag = bool(request) and request.httprequest.headers.get('If-None-Match') - retag = '"%s"' % hashlib.md5(pycompat.to_text(content).encode('utf-8')).hexdigest() + retag = '"%s"' % hashlib.md5(content).hexdigest() status = status or (304 if etag == retag else 200) headers.append(('ETag', retag)) if download: