1
0
mirror of https://github.com/glitch-soc/mastodon.git synced 2025-01-22 15:43:04 -05:00
Claire 48f8658d34
Fix upload of remote media with OpenStack Swift sometimes failing ()
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.
2021-11-16 21:36:28 +01:00
..