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

Commit

Permalink
Fix SimpleHttpClient not sending Accept header in get_json (#11677)
Browse files Browse the repository at this point in the history
Co-authored-by: reivilibre <olivier@librepush.net>
  • Loading branch information
icelimetea and reivilibre authored Jan 5, 2022
1 parent 7a1cefc commit 0201c63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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.
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

0 comments on commit 0201c63

Please sign in to comment.