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

[tor-commits] [flashproxy/master] Bail out after an error in a WebSocket request.



commit 593d9981b519b728ad700de0d86d2aed6f76c95d
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Sun Apr 1 10:10:15 2012 -0700

    Bail out after an error in a WebSocket request.
    
    Without this, an exception happened later because the
    BaseHTTPRequestHandler did not fill in all the necessary fields.
---
 connector.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/connector.py b/connector.py
index 89455ad..db32f03 100755
--- a/connector.py
+++ b/connector.py
@@ -383,6 +383,8 @@ def handle_websocket_request(fd):
     log(u"handle_websocket_request")
     request_text = fd.recv(10 * 1024)
     handler = WebSocketRequestHandler(request_text, fd)
+    if handler.error:
+        return None
     method = handler.command
     path = handler.path
     headers = handler.headers



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