details:   https://code.tryton.org/tryton/commit/31b6d5ec475b
branch:    7.8
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
        (grafted from 9c76c6dd5260167ba1d48af8f0e05902c9892253)
diffstat:

 trytond/trytond/protocols/xmlrpc.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r e21f16e6324a -r 31b6d5ec475b 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)

Reply via email to