when the target file redirected to a result url which has no content-length, call getinfo for CURLINFO_CONTENT_LENGTH_DOWNLOAD will get the previous 302 page's body content-length, this PR fixed it: https://github.com/bagder/curl/pull/59
test link: http://mp3.live.tv-radio.com/francemusique/all/francemusiquehautdebit.mp3
I can't repeat this problem with the test case as attached.
it's a fixed bug: http://sourceforge.net/p/curl/bugs/1102/
sorry for bother.
No worries, I'm just glad it works now! Closing this issue.