summary refs log tree commit diff
path: root/synapse/rest/key/v1
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-05-10 18:46:59 +0100
committerRichard van der Hoff <richard@matrix.org>2018-05-10 18:50:27 +0100
commit318711e1399da009910c3a9e5fa297c28a2d0a97 (patch)
tree2fac172d40559f54fa2a349216e79548a5e0781e /synapse/rest/key/v1
parentMerge pull request #3203 from matrix-org/rav/refactor_request_handler (diff)
downloadsynapse-318711e1399da009910c3a9e5fa297c28a2d0a97.tar.xz
Set Server header in SynapseRequest
(instead of everywhere that writes a response. Or rather, the subset of places
which write responses where we haven't forgotten it).

This also means that we don't have to have the mysterious version_string
attribute in anything with a request handler.

Unfortunately it does mean that we have to pass the version string wherever we
instantiate a SynapseSite, which has been c&ped 150 times, but that is code
that ought to be cleaned up anyway really.
Diffstat (limited to 'synapse/rest/key/v1')
-rw-r--r--synapse/rest/key/v1/server_key_resource.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/synapse/rest/key/v1/server_key_resource.py b/synapse/rest/key/v1/server_key_resource.py
index bd4fea5774..1498d188c1 100644
--- a/synapse/rest/key/v1/server_key_resource.py
+++ b/synapse/rest/key/v1/server_key_resource.py
@@ -49,7 +49,6 @@ class LocalKey(Resource):
     """
 
     def __init__(self, hs):
-        self.version_string = hs.version_string
         self.response_body = encode_canonical_json(
             self.response_json_object(hs.config)
         )
@@ -84,7 +83,6 @@ class LocalKey(Resource):
     def render_GET(self, request):
         return respond_with_json_bytes(
             request, 200, self.response_body,
-            version_string=self.version_string
         )
 
     def getChild(self, name, request):