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

[tor-commits] [flashproxy/master] Check that handler.path exists.



commit 4e9fdcf8b427c2005c0b2fb8a4200b7647d6b918
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Mon Apr 2 14:08:57 2012 -0700

    Check that handler.path exists.
    
    The connector was crashing when a connection was made to the remote port
    and then closed without sending any data.
---
 connector.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/connector.py b/connector.py
index f7f35e3..a4e242a 100755
--- a/connector.py
+++ b/connector.py
@@ -391,7 +391,7 @@ def handle_websocket_request(fd):
     log(u"handle_websocket_request")
     request_text = fd.recv(10 * 1024)
     handler = WebSocketRequestHandler(request_text, fd)
-    if handler.error:
+    if handler.error or not hasattr(handler, "path"):
         return None
     method = handler.command
     path = handler.path



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