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

isis at torproject.org isis at torproject.org
Wed Dec 20 23:10:05 UTC 2017


commit 6aaa2ed270e432efddd7cdc9ea81b83c00fe9c75
Author: Isis Lovecruft <isis at torproject.org>
Date:   Wed Dec 13 20:10:32 2017 +0000

    Revert "Change "client-transport" moat resource type to "moat-transports"."
    
    This reverts commit 50a9321fadcfd0e9a4f30bc1919c1bf46d27d8e1.
---
 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 096b8c0..eb356fe 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": "moat-transports".
-                * "supported": ["TRANSPORT", … ]
+                * "type": "client-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"] != "moat-transports":
+            if data["type"] != "client-transports":
                 raise ValueError(
                     "Bad JSON API object type: expected %s got %s" %
-                    ('moat-transports', data["type"]))
+                    ('client-transports', data["type"]))
             elif data["version"] != MOAT_API_VERSION:
                 raise ValueError(
                     "Client requested protocol version %s, but we're using %s" %





More information about the tor-commits mailing list