[tor-commits] [flashproxy/master] Comment WebSocketRequestHandler.

dcf at torproject.org dcf at torproject.org
Fri Sep 7 12:06:14 UTC 2012


commit efc80968b2c8614739f38bbb5bfd3703d0eb82e9
Author: David Fifield <david at bamsoftware.com>
Date:   Fri Sep 7 03:05:37 2012 -0700

    Comment WebSocketRequestHandler.
    
    Python doesn't give us a straightforward way to parse an HTTP request as
    a string, so we do it through a BaseHTTPRequestHandler.
---
 flashproxy-client |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/flashproxy-client b/flashproxy-client
index a8dcd15..daf710b 100755
--- a/flashproxy-client
+++ b/flashproxy-client
@@ -442,6 +442,8 @@ def format_peername(s):
 # to avoid Slowloris-like attacks.
 WEBSOCKET_REQUEST_TIMEOUT = 2.0
 
+# This subclass of BaseHTTPRequestHandler is essentially a means of parsing an
+# HTTP request.
 class WebSocketRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
     def __init__(self, request_text, fd):
         self.rfile = cStringIO.StringIO(request_text)





More information about the tor-commits mailing list