When content-length is not specified, whole file is read to memory. Use chunks instead.
PR #983
What is the best way to replicate this issue?
And how often does this occur?
Just try to download big file (image) on system without free memory. Python will get killed as it is trying to accommodate it in memory (Hit when testing some other issue) as I (test machine) send content-length header always, so iterator part will not get run. I expect that many download servers are configured this way, on the other hand I don't think it is happening too much in real world as most CLI users have enough memory to not see it,
Metadata Update from @dgregor: - Custom field Size adjusted to None - Issue set to the milestone: 1.20
Commit 7301d587 fixes this issue
Commit 98b83eff fixes this issue
Metadata Update from @jcupova: - Issue tagged with: testing-done
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/koji/koji/issues/982
Please continue any further discussion there.