Fix a bug when a POST was redirected to a GET.

We were keeping the Content-Length header, leading to conflicting
body information.

(cherry picked from commit 64047a14abd377dbbd5d51f714cf08f33e7817dd)