[tor-commits] [flashproxy/master] Comment our slight abuse of the POST body format.

infinity0 at torproject.org infinity0 at torproject.org
Mon Oct 28 14:47:41 UTC 2013


commit 2d7a8582ad6155a13d2d1b1e2ecdfd7038bc4b89
Author: David Fifield <david at bamsoftware.com>
Date:   Thu Oct 17 04:50:05 2013 -0700

    Comment our slight abuse of the POST body format.
---
 facilitator/facilitator.cgi |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/facilitator/facilitator.cgi b/facilitator/facilitator.cgi
index 47497b0..e8b658e 100755
--- a/facilitator/facilitator.cgi
+++ b/facilitator/facilitator.cgi
@@ -102,6 +102,12 @@ def do_post():
     # them look like "client-websocket=1.2.3.4:9000". We then split
     # all those items and send them as separate registrations to the
     # facilitator.
+    #
+    # We treat sys.stdin as being a bunch of newline-separated query strings. I
+    # think that this is technically a violation of the
+    # application/x-www-form-urlencoded content-type the client likely used, but
+    # it at least matches the standard multiline registration format used by
+    # facilitator-reg-daemon.
     try:
         regs = list(fac.read_client_registrations(sys.stdin.read(), defhost=remote_addr[0]))
     except ValueError:





More information about the tor-commits mailing list