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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/11677.bugfix
@@ -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
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