Fix upload of remote media with OpenStack Swift sometimes failing (#16998)
Fix upload of remote media with OpenStack Swift sometimes failing (#16998)

Under certain conditions, files fetched from remotes trigger an error when
being uploaded using OpenStack Swift. This is because in some cases, the
remote server will not return a content-length, so our ResponseWithLimitAdapter
will hold a `nil` value for `#size`, which will lead to an invalid value
for the Content-Length header of the Swift API call.

This commit fixes that by taking the size from the actually-downloaded file
size rather than the upstream-provided Content-Length header value.
Kirishima21/mastodon,h3zjp/mastodon,gol-cha/mastodon,pinfort/mastodon,Kirishima21/mastodon,yi0713/mastodon,MitarashiDango/mastodon,masto-donte-com-br/mastodon,im-in-space/mastodon,gol-cha/mastodon,glitch-soc/mastodon,h3zjp/mastodon,ikuradon/mastodon,glitch-soc/mastodon,masto-donte-com-br/mastodon,koba-lab/mastodon,theoria24/mastodon,lindwurm/mastodon,yukimochi/mastodon,imas/mastodon,musashino205/mastodon,Ryanaka/mastodon,koba-lab/mastodon,im-in-space/mastodon,Ryanaka/mastodon,theoria24/mastodon,musashino205/mastodon,theoria24/mastodon,lindwurm/mastodon,yukimochi/mastodon,Kirishima21/mastodon,musashino205/mastodon,abcang/mastodon,glitch-soc/mastodon,yi0713/mastodon,ykzts/mastodon,h3zjp/mastodon,pinfort/mastodon,imas/mastodon,koba-lab/mastodon,tootcafe/mastodon,gol-cha/mastodon,cobodo/mastodon,masto-donte-com-br/mastodon,imas/mastodon,MitarashiDango/mastodon,yukimochi/mastodon,ykzts/mastodon,MitarashiDango/mastodon,cobodo/mastodon,theoria24/mastodon,ykzts/mastodon,ikuradon/mastodon,maa123/mastodon,MitarashiDango/mastodon,maa123/mastodon,abcang/mastodon,lindwurm/mastodon,glitch-soc/mastodon,cobodo/mastodon,tootcafe/mastodon,musashino205/mastodon,imas/mastodon,tootcafe/mastodon,im-in-space/mastodon,Ryanaka/mastodon,maa123/mastodon,cobodo/mastodon,ikuradon/mastodon,abcang/mastodon,yi0713/mastodon,gol-cha/mastodon,Kirishima21/mastodon,im-in-space/mastodon,masto-donte-com-br/mastodon,ikuradon/mastodon,pinfort/mastodon,yukimochi/mastodon,koba-lab/mastodon,pinfort/mastodon,Ryanaka/mastodon,tootcafe/mastodon,lindwurm/mastodon,maa123/mastodon,abcang/mastodon,yi0713/mastodon,ykzts/mastodon,h3zjp/mastodon