summary refs log tree commit diff
path: root/synapse/http/server.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-16 14:26:36 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-16 14:26:36 +0100
commiteb19dc55784baacee1d3f24b2adae6a16993bccb (patch)
treeeeb45a38762d2932fc01190a93c8130f98a0632d /synapse/http/server.py
parentMerge commit '6ff34e00d' into anoa/dinsic_release_1_31_0 (diff)
parentRefactor `SsoHandler.get_mxid_from_sso` (#8900) (diff)
downloadsynapse-eb19dc55784baacee1d3f24b2adae6a16993bccb.tar.xz
Merge commit 'c64002e1c' into anoa/dinsic_release_1_31_0
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r--synapse/http/server.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py

index 6a4e429a6c..e464bfe6c7 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py
@@ -275,6 +275,10 @@ class DirectServeJsonResource(_AsyncResource): formatting responses and errors as JSON. """ + def __init__(self, canonical_json=False, extract_context=False): + super().__init__(extract_context) + self.canonical_json = canonical_json + def _send_response( self, request: Request, code: int, response_object: Any, ): @@ -318,9 +322,7 @@ class JsonResource(DirectServeJsonResource): ) def __init__(self, hs, canonical_json=True, extract_context=False): - super().__init__(extract_context) - - self.canonical_json = canonical_json + super().__init__(canonical_json, extract_context) self.clock = hs.get_clock() self.path_regexs = {} self.hs = hs