Suspected problem with XMLRPCHandler and JSONRPCHandler

13 views
Skip to first unread message

Andrew McNamara

unread,
Sep 6, 2016, 4:55:30 AM9/6/16
to Tornado RPC (Python)
We are seeing an issue where the results are sent back to the wrong clients when multiple requests overlap and I think I've identified a problem in the the way XMLRPCHandler and JSONRPCHandler work. I note that a similar issue was reported in 2010.

XMLRPCHandler and JSONRPCHandler have a class attribute _RPC_ referencing their respective Parser instance. This means the Parser instance is shared between all instances of the Handler and is essentially a singleton. Unfortunately, the BaseRPCParser.run() method saves a reference to the handler instance on the (shared) parser instance, which gets overwritten with each incoming request. The responses then end up going to the most recent handler, rather than the handler that produced the request.
Reply all
Reply to author
Forward
0 new messages