forked-synapse/synapse/http
Shay 429ecb7564
Handle remote download responses with UNKNOWN_LENGTH more gracefully (#17439)
Prior to this PR, remote downloads which did not provide a
`content-length` were decremented from the remote download ratelimiter
at the max allowable size, leading to excessive ratelimiting - see
https://github.com/element-hq/synapse/issues/17394.

This PR adds a linearizer to limit concurrent remote downloads to 6 per
IP address, and decrements remote downloads without a `content-length`
from the ratelimiter *after* the download is complete and the response
length is known.

Also adds logic to ensure that responses with a known length respect the
`max_download_size`.
2024-07-16 11:13:55 +01:00
..
federation Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
additional_resource.py Update license headers 2023-11-21 15:29:58 -05:00
client.py Support MSC3916 by adding _matrix/client/v1/media/download endpoint (#17365) 2024-07-02 14:07:04 +01:00
connectproxyclient.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
matrixfederationclient.py Handle remote download responses with UNKNOWN_LENGTH more gracefully (#17439) 2024-07-16 11:13:55 +01:00
proxy.py Fix mypy on latest Twisted release (#17036) 2024-04-11 16:03:45 +01:00
proxyagent.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
replicationagent.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
request_metrics.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
server.py MSC4108 implementation (#17056) 2024-04-25 12:50:12 +00:00
servlet.py Tidy up integer parsing (#17339) 2024-06-24 15:12:14 +02:00
site.py Fix mypy on latest Twisted release (#17036) 2024-04-11 16:03:45 +01:00
types.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00