Proxy plugin: Fixed bug with POST time-outs

* Fixed bug with POST requests resulting in timed-out connections due to
   forwarding a 'Content-Length' request header to the origin server.
* Also performed a tiny code cleanup.