You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This breaks inside the expat parser because it is not able to handle chars outside ASCII which are latin-1 encoded as the default encoding for XML-RPC seems to be utf-8.
I propose to omit converting of the HTTP body and instead using the raw data to feed the parser.
The text was updated successfully, but these errors were encountered:
A byte (i.e. an integer between 0 and 255) is naturally represented
by the unicode character with its value as unicode codepoint.
Based on this representation, it is natuaral to convert a `bytes` object
to `str` via `bytes.decode("latin1")` and revert the conversion
via `str.encode("latin-1")`.
Therefore, I think that it is `ZopeTestTransport` which does
the wrong thing, not `FakeSocket`.
ZopeTestTranport
does a decode of the body withutf-8
to convert it frombytes
tostr
:zope.app.publisher/src/zope/app/publisher/xmlrpc/testing.py
Lines 79 to 81 in 19ee519
Later on
FakeSocket
converts the bodystr
back tobytes
usinglatin-1
:zope.app.publisher/src/zope/app/publisher/xmlrpc/testing.py
Lines 24 to 25 in 19ee519
This breaks inside the expat parser because it is not able to handle chars outside ASCII which are
latin-1
encoded as the default encoding for XML-RPC seems to beutf-8
.I propose to omit converting of the HTTP body and instead using the raw data to feed the parser.
The text was updated successfully, but these errors were encountered: