diff options
author | Hugh Nimmo-Smith <hughns@users.noreply.github.com> | 2022-10-18 16:52:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 15:52:25 +0000 |
commit | 4eaf3eb840b8cfa78d970216c74fc128495f08a5 (patch) | |
tree | f3f214f9df2b6b207d558961390190763c5bc70d /synapse/rest/key/v2 | |
parent | Don't pin dev-deps in pyproject; use lower bounds (#14227) (diff) | |
download | synapse-4eaf3eb840b8cfa78d970216c74fc128495f08a5.tar.xz |
Implementation of HTTP 307 response for MSC3886 POST endpoint (#14018)
Co-authored-by: reivilibre <olivier@librepush.net> Co-authored-by: Andrew Morgan <andrewm@element.io>
Diffstat (limited to 'synapse/rest/key/v2')
-rw-r--r-- | synapse/rest/key/v2/local_key_resource.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/key/v2/local_key_resource.py b/synapse/rest/key/v2/local_key_resource.py index 0c9f042c84..095993415c 100644 --- a/synapse/rest/key/v2/local_key_resource.py +++ b/synapse/rest/key/v2/local_key_resource.py @@ -20,9 +20,9 @@ from signedjson.sign import sign_json from unpaddedbase64 import encode_base64 from twisted.web.resource import Resource -from twisted.web.server import Request from synapse.http.server import respond_with_json_bytes +from synapse.http.site import SynapseRequest from synapse.types import JsonDict if TYPE_CHECKING: @@ -99,7 +99,7 @@ class LocalKey(Resource): json_object = sign_json(json_object, self.config.server.server_name, key) return json_object - def render_GET(self, request: Request) -> Optional[int]: + def render_GET(self, request: SynapseRequest) -> Optional[int]: time_now = self.clock.time_msec() # Update the expiry time if less than half the interval remains. if time_now + self.config.key.key_refresh_interval / 2 > self.valid_until_ts: |