Fix redirected stream content-length. Fix #14647

It is an old bug of curl which already fixed in curl 2 years ago, but we are using the 3 years old version of curl.

this is the backport to fix the specific problem.