content-length: 0 and small fixes

Hi mayanez, 

I really like what you are doing here! My fork is probably going to start diverging from yours, but I wanted to send you these fixes first. The main being that I have to explicitly set Content-Length to '0' for the RPC server to respond. This may have to do with the version of requests that I am using.

cheers,