summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsis Lovecruft <isis@torproject.org>2017-12-13 18:24:04 +0000
committerIsis Lovecruft <isis@torproject.org>2017-12-13 18:24:04 +0000
commit50a9321fadcfd0e9a4f30bc1919c1bf46d27d8e1 (patch)
treed6899099d55395735994f475ed59bcd11a4b972c
parent8d8db4a06d3dff5e9f82adcb4e0e921fe3577098 (diff)
Change "client-transport" moat resource type to "moat-transports".
-rw-r--r--bridgedb/distributors/moat/server.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/bridgedb/distributors/moat/server.py b/bridgedb/distributors/moat/server.py
index eb356fe..096b8c0 100644
--- a/bridgedb/distributors/moat/server.py
+++ b/bridgedb/distributors/moat/server.py
@@ -386,12 +386,12 @@ class CaptchaFetchResource(CaptchaResource):
:param str request: A JSON blob containing the following
fields:
* "version": The moat protocol version.
- * "type": "client-transports".
- * "supported": ['TRANSPORT', … ]
+ * "type": "moat-transports".
+ * "supported": ["TRANSPORT", … ]
where:
- * TRANSPORT is a string identifying a transport, e.g. "obfs3" or
- "obfs4". Currently supported transport identifiers are:
- "vanilla", "fte", "obfs3", "obfs4", "scramblesuit".
+ * ``TRANSPORT`` is a string identifying a transport, e.g.
+ "obfs3" or "obfs4". Currently supported transport identifiers
+ are: "vanilla", "fte", "obfs3", "obfs4", "scramblesuit".
:rtype: list
:returns: The list of transports the client supports.
"""
@@ -401,10 +401,10 @@ class CaptchaFetchResource(CaptchaResource):
encoded_data = request.content.read()
data = json.loads(encoded_data)["data"][0]
- if data["type"] != "client-transports":
+ if data["type"] != "moat-transports":
raise ValueError(
"Bad JSON API object type: expected %s got %s" %
- ('client-transports', data["type"]))
+ ('moat-transports', data["type"]))
elif data["version"] != MOAT_API_VERSION:
raise ValueError(
"Client requested protocol version %s, but we're using %s" %