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

Commit 0201c63

Browse files
Fix SimpleHttpClient not sending Accept header in get_json (#11677)
Co-authored-by: reivilibre <[email protected]>
1 parent 7a1cefc commit 0201c63

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/11677.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix wrong variable reference in `SimpleHttpClient.get_json` that results in the absence of the `Accept` header in the request.

synapse/http/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ async def get_json(
588588
if headers:
589589
actual_headers.update(headers) # type: ignore
590590

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

594594
async def put_json(

0 commit comments

Comments
 (0)