tcalmant / jsonrpclib

A Python (2 & 3) JSON-RPC over HTTP that mirrors the syntax of xmlrpclib (aka jsonrpclib-pelix)
https://jsonrpclib-pelix.readthedocs.io/
Apache License 2.0
53 stars 24 forks source link

SimpleJSONRPCRequestHandler hangs handling UTF-8 content #42

Closed gylead closed 4 years ago

gylead commented 4 years ago

In method SimpleJSONRPCRequestHandler.do_POST size_remaining is lowered by len(chunk[-1]) instead of len(raw_chunk). size_remaining is a byte count while len(chunk[-1]) is a string length. Having a content that contains multi-byte characters the while loop hangs.

tcalmant commented 4 years ago

Well spotted ! Thanks :)