details: https://code.tryton.org/tryton/commit/9c76c6dd5260
branch: default
user: Cédric Krier <[email protected]>
date: Mon Dec 22 20:11:10 2025 +0100
description:
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
diffstat:
trytond/trytond/protocols/xmlrpc.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 7217ae50b90a -r 9c76c6dd5260 trytond/trytond/protocols/xmlrpc.py
--- a/trytond/trytond/protocols/xmlrpc.py Tue Dec 23 09:52:40 2025 +0100
+++ b/trytond/trytond/protocols/xmlrpc.py Mon Dec 22 20:11:10 2025 +0100
@@ -181,7 +181,7 @@
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)