[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/develop] Change "client-transport" moat resource type to "moat-transports".



commit 50a9321fadcfd0e9a4f30bc1919c1bf46d27d8e1
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Wed Dec 13 18:24:04 2017 +0000

    Change "client-transport" moat resource type to "moat-transports".
---
 bridgedb/distributors/moat/server.py | 14 +++++++-------
 1 file 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" %



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits