Saturday, December 09, 2006

myelin: HTTP / XMLRPC debug proxy

myelin: HTTP / XMLRPC debug proxy: "If you're doing XML-RPC in Python, you have little requirement for debugging tools because it handles exceptions and all that very nicely and you can just dump debugging stuff to the console.

However, if you're doing XML-RPC in PHP, you'll get all screwed up if you don't have some way of seeing what's going on. Whenever your script gets a warning or fails to compile, the error goes to the browser rather than the log file, which is guaranteed to kill the XML parser at the calling end of the link.

This little script is one solution to this problem. It's based on the simple proxy in the Medusa tutorial (that's the asynch socket library that Python Community Server uses), and slightly modified to not mangle XML-RPC responses.

Run it on your local machine (or your web server, if you prefer) and point your XMLRPC client at it rather than at the target. It will proxy your requests through and also dump them to the console, so you can see what's going on."