summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-23 15:35:09 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-23 15:35:09 +0000
commit0696dfd94b5d32679009368508d26ae1a6630994 (patch)
treeb51868af754c23165730550b7e1af22e4b1064c3 /synapse/rest
parentAdd RegisterFallbackResource to /_matrix/static/client/register (diff)
downloadsynapse-0696dfd94b5d32679009368508d26ae1a6630994.tar.xz
Actually treat this as static content, not random Resources.
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v1/__init__.py8
-rw-r--r--synapse/rest/client/v1/register.py21
2 files changed, 0 insertions, 29 deletions
diff --git a/synapse/rest/client/v1/__init__.py b/synapse/rest/client/v1/__init__.py
index 1ebdeadca5..21876b3487 100644
--- a/synapse/rest/client/v1/__init__.py
+++ b/synapse/rest/client/v1/__init__.py
@@ -28,14 +28,6 @@ class ClientV1RestResource(JsonResource):
         JsonResource.__init__(self, hs)
         self.register_servlets(self, hs)
 
-    def get_extra_resources(self, hs):
-        # some parts of client v1 need to produce HTML as the output (e.g.
-        # fallback pages) but we can only produce JSON output. In an effort to
-        # keep similar logic close together, we'll call through to any servlet
-        # which requires HTML output.
-        register_resources = register.get_prefixes_and_resources(hs)
-        return register_resources
-
     @staticmethod
     def register_servlets(client_resource, hs):
         room.register_servlets(hs, client_resource)
diff --git a/synapse/rest/client/v1/register.py b/synapse/rest/client/v1/register.py
index eee567a583..f5acfb945f 100644
--- a/synapse/rest/client/v1/register.py
+++ b/synapse/rest/client/v1/register.py
@@ -18,12 +18,10 @@ from twisted.internet import defer
 
 from synapse.api.errors import SynapseError, Codes
 from synapse.api.constants import LoginType
-from synapse.api.urls import STATIC_PREFIX
 from base import ClientV1RestServlet, client_path_pattern
 import synapse.util.stringutils as stringutils
 
 from synapse.util.async import run_on_reactor
-from twisted.web.resource import Resource
 
 from hashlib import sha1
 import hmac
@@ -307,16 +305,6 @@ class RegisterRestServlet(ClientV1RestServlet):
         })
 
 
-class RegisterFallbackResource(Resource):
-
-    def __init__(self, hs):
-        Resource.__init__(self)  # Resource is an old-style class :(
-        self.hs = hs
-
-    def render_GET(self, request):
-        return "NOT_YET_IMPLEMENTED"
-
-
 def _parse_json(request):
     try:
         content = json.loads(request.content.read())
@@ -327,14 +315,5 @@ def _parse_json(request):
         raise SynapseError(400, "Content not JSON.")
 
 
-def get_prefixes_and_resources(hs):
-    return [
-        (
-            STATIC_PREFIX + "/client/register",
-            RegisterFallbackResource(hs)
-        )
-    ]
-
-
 def register_servlets(hs, http_server):
     RegisterRestServlet(hs).register(http_server)