Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix SimpleHttpClient not sending Accept header in get_json #11677

Merged
merged 3 commits into from
Jan 5, 2022
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
1 change: 1 addition & 0 deletions changelog.d/11677.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix wrong variable reference in `SimpleHttpClient.get_json` that results in the absence of the `Accept` header in the request.
icelimetea marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion synapse/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ async def get_json(
if headers:
actual_headers.update(headers) # type: ignore

body = await self.get_raw(uri, args, headers=headers)
body = await self.get_raw(uri, args, headers=actual_headers)
return json_decoder.decode(body.decode("utf-8"))

async def put_json(
Expand Down