[tor-commits] [flashproxy/master] Fix a bug when handling FieldStorage.getlist() return values.

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


commit dac5b62449ff4987d7270921b10dd41a2c381cb1
Author: George Kadianakis <desnacked at riseup.net>
Date:   Thu Sep 19 13:19:53 2013 +0300

    Fix a bug when handling FieldStorage.getlist() return values.
    
    getlist() returns the empty list when it doesn't find a value, not None.
---
 facilitator/facilitator.cgi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/facilitator/facilitator.cgi b/facilitator/facilitator.cgi
index e0dbb3f..51a898a 100755
--- a/facilitator/facilitator.cgi
+++ b/facilitator/facilitator.cgi
@@ -69,7 +69,7 @@ def do_get():
         # 'transports' (optional) can be repeated and carries
         # transport names.
         transport_list = fs.getlist("transport")
-        if transport_list is None:
+        if not transport_list:
             transport_list = ["websocket"]
 
         try:





More information about the tor-commits mailing list