content length fix

I found an idiotic error in our content length setting code that's caused a ton of issues.  I'm going to build some more tests around that specifically, but this will fix lots of cases.