[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Comment WebSocketRequestHandler.
commit efc80968b2c8614739f38bbb5bfd3703d0eb82e9
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits