From 8189d4570491a3f82889ad59a8acbe35bf01516c Mon Sep 17 00:00:00 2001 From: Kazuhiko SHIOZAKI <kazuhiko@nexedi.com> Date: Fri, 14 Oct 2022 14:37:45 +0200 Subject: [PATCH] py2/py3: DownloadableMixin.index_html() should return bytes. --- .../portal_components/mixin.erp5.DownloadableMixin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.DownloadableMixin.py b/product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.DownloadableMixin.py index e4473fd22d0..3d3c99d1780 100644 --- a/product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.DownloadableMixin.py +++ b/product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.DownloadableMixin.py @@ -167,7 +167,7 @@ class DownloadableMixin: RESPONSE.setHeader('Accept-Ranges', 'bytes') else: RESPONSE.setHeader('Content-Disposition', 'inline') - return str(data) + return bytes(data) security.declareProtected(Permissions.AccessContentsInformation, 'getStandardFilename') -- 2.30.9