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

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



commit dac5b62449ff4987d7270921b10dd41a2c381cb1
Author: George Kadianakis <desnacked@xxxxxxxxxx>
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:



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