aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol/tcp.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-03-08 15:47:27 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-03-08 15:47:27 +0100
commit2b01c4eee7a52dfb5fd30bb9b248cec87d563db9 (patch)
tree72604de5152bdf15147a78e03a669a207baeac95 /libmproxy/protocol/tcp.py
parent3032672f10c727623ee085d04d623901dac856df (diff)
parent221973aff6553ffb1d40859c5d35b88d959f9718 (diff)
downloadmitmproxy-2b01c4eee7a52dfb5fd30bb9b248cec87d563db9.tar.gz
mitmproxy-2b01c4eee7a52dfb5fd30bb9b248cec87d563db9.tar.bz2
mitmproxy-2b01c4eee7a52dfb5fd30bb9b248cec87d563db9.zip
Merge branch 'master' of github.com:mitmproxy/mitmproxy
Diffstat (limited to 'libmproxy/protocol/tcp.py')
-rw-r--r--libmproxy/protocol/tcp.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/libmproxy/protocol/tcp.py b/libmproxy/protocol/tcp.py
index df7e6692..1591eb04 100644
--- a/libmproxy/protocol/tcp.py
+++ b/libmproxy/protocol/tcp.py
@@ -32,12 +32,11 @@ class TCPHandler(ProtocolHandler):
if d == "": # connection closed
break
data.write(d)
-
- """
- OpenSSL Connections have an internal buffer that might contain data altough everything is read
- from the socket. Thankfully, connection.pending() returns the amount of bytes in this buffer,
- so we can read it completely at once.
- """
+ # OpenSSL Connections have an internal buffer that might
+ # contain data altough everything is read from the socket.
+ # Thankfully, connection.pending() returns the amount of
+ # bytes in this buffer, so we can read it completely at
+ # once.
if src.ssl_established:
data.write(rfile.read(src.connection.pending()))
else: # no data left, but not closed yet
@@ -57,4 +56,4 @@ class TCPHandler(ProtocolHandler):
self.c.log("%s %s\r\n%s" % (direction, dst_str,data))
dst.wfile.write(data)
- dst.wfile.flush() \ No newline at end of file
+ dst.wfile.flush()