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
This commit is contained in:
Cédric Krier
2025-12-22 20:11:10 +01:00
parent 2ab19cf6eb
commit 6b9135321c
+1 -1
View File
@@ -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)