gearheads
/
mastodon
Archived
2
0
Fork 0
Commit Graph

4 Commits (e2a3ebb271017d800a448ad3ef3e8324ac1fab3b)

Author SHA1 Message Date
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
ThibG 5bbc9a4f78
Fix downloading remote media files when server returns empty filename ()
Fixes 
2020-09-27 22:00:43 +02:00
ThibG a1412491b7
Change content-type to be always computed from file data ()
* Change content-type to be always computed from file data

Restore previous behavior, detecting the content-type isn't very
expensive, and some instances may serve files as application/octet-stream
regardless of their true type, making fetching media from them fail, while
it used to work pre-3.2.0.

* Add test
2020-08-02 11:21:10 +02:00
Eugen Rochko 7aaf2b44ec
Fix remote files not using Content-Type header, streaming () 2020-06-30 23:58:02 +02:00