mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 02:43:54 +01:00
Fix SimpleHttpClient not sending Accept header in get_json
(#11677)
Co-authored-by: reivilibre <olivier@librepush.net>
This commit is contained in:
parent
7a1cefc6e3
commit
0201c6371c
2 changed files with 2 additions and 1 deletions
1
changelog.d/11677.bugfix
Normal file
1
changelog.d/11677.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix wrong variable reference in `SimpleHttpClient.get_json` that results in the absence of the `Accept` header in the request.
|
|
@ -588,7 +588,7 @@ class SimpleHttpClient:
|
||||||
if headers:
|
if headers:
|
||||||
actual_headers.update(headers) # type: ignore
|
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"))
|
return json_decoder.decode(body.decode("utf-8"))
|
||||||
|
|
||||||
async def put_json(
|
async def put_json(
|
||||||
|
|
Loading…
Reference in a new issue