From 6b9135321c367ab228cdfd87441480189def84e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 22 Dec 2025 20:11:10 +0100 Subject: [PATCH] Pass XML-RPC string to GzipStream instead of bytes Since 0a04dc8fa935 the GzipStream class expect a string or a generator of strings but not bytes. Closes #14445 --- trytond/trytond/protocols/xmlrpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/trytond/protocols/xmlrpc.py b/trytond/trytond/protocols/xmlrpc.py index c1746a5ea9..513745f9a5 100644 --- a/trytond/trytond/protocols/xmlrpc.py +++ b/trytond/trytond/protocols/xmlrpc.py @@ -181,7 +181,7 @@ class XMLProtocol: data = client.dumps( data, methodresponse=True, allow_none=True) if len(data) >= 1400 and 'gzip' in request.accept_encodings: - data = GzipStream(data.encode('utf-8'), compresslevel=1) + data = GzipStream(data, compresslevel=1) headers['Content-Encoding'] = 'gzip' return Response( data, content_type='text/xml', headers=headers)