Content-Transfer-Encoding: binary is not decoded correctly
The problem is caused by the code in FFGET_getnewblock() that turns NUL bytes into spaces. The binary encoding of a binary file, such as an image, will most likely contain NUL bytes. Turning them into spaces will corrupt the file.
A workaround is to enable the undocumented --formdata option that disables the NUL to space conversion. However, it would be more correct to disable the conversion when processing the binary encoded data and turn it back on afterward.
Ugh, just wasted 2 hours on this, and now it works! thank you for the suggestion.
Thanks for bringing this up. The code these days is quite "foreign" to me given that I wrote it more than a quarter of a century ago. Not quite sure I'd be game to rewrite it all though.
At least with this issue's details it might help other people too.
I went through and tried every CLI option I thought might help. I saw --formdata but thought, there's no way that'll work and didn't try it until coming to this post. Might be worth just adding this tidbit to the manual page. Thank you for this great program!
How do you think it would be preferred to detail/write that addition in the manual ?
On the site it's written:
--formdata : Process as form data (from HTML form etc)
Maybe it could be:
--formdata : Process as form data (from HTML form etc), and disable conversion of NUL bytes in binary data
Using hexdump I could see the problematic spaces being inserted, so the above wording would've made it clear that this option was going to fix my issue.