don't forward content-length from request

this appears to cause things to hang

also moved some cleanup to proper places