Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix starting non-media repos #17626

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion changelog.d/17543.bugfix
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fix authenticated media responses using a wrong limit when following redirects over federation.
Fix authenticated media responses using a wrong limit when following redirects over federation.
1 change: 1 addition & 0 deletions changelog.d/17626.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix authenticated media responses using a wrong limit when following redirects over federation.
6 changes: 2 additions & 4 deletions synapse/http/matrixfederationclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,6 @@ def __init__(
self.max_long_retries = hs.config.federation.max_long_retries
self.max_short_retries = hs.config.federation.max_short_retries

self.max_download_size = hs.config.media.max_upload_size

self._cooperator = Cooperator(scheduler=_make_scheduler(self.reactor))

self._sleeper = AwakenableSleeper(self.reactor)
Expand Down Expand Up @@ -1759,9 +1757,9 @@ async def federation_get_file(
str_url,
)
# We don't know how large the response will be upfront, so limit it to
# the `max_upload_size` config value.
# the `max_size` config value.
length, headers, _, _ = await self._simple_http_client.get_file(
str_url, output_stream, self.max_download_size
str_url, output_stream, max_size
)

logger.info(
Expand Down
Loading