diff options
author | Maximilian Hils <git@maximilianhils.com> | 2013-08-17 16:15:37 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2013-08-17 16:15:37 +0200 |
commit | c44f354fd0f9b4f1432913dd70cf1579910dfa4b (patch) | |
tree | 0370595833d5344bd9e179387c09845fc18e6b27 /netlib | |
parent | 0fed8dc8eb2440a35b5ce95ba7e7360441ff677c (diff) | |
download | mitmproxy-c44f354fd0f9b4f1432913dd70cf1579910dfa4b.tar.gz mitmproxy-c44f354fd0f9b4f1432913dd70cf1579910dfa4b.tar.bz2 mitmproxy-c44f354fd0f9b4f1432913dd70cf1579910dfa4b.zip |
fix windows bugs
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/tcp.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py index 31e9a398..2de647ae 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -235,6 +235,7 @@ class TCPClient: try: if self.ssl_established: self.connection.shutdown() + self.connection.sock_shutdown(socket.SHUT_WR) else: self.connection.shutdown(socket.SHUT_WR) #Section 4.2.2.13 of RFC 1122 tells us that a close() with any pending readable data could lead to an immediate RST being sent. @@ -302,6 +303,7 @@ class BaseHandler: if request_client_cert: def ver(*args): self.clientcert = certutils.SSLCert(args[1]) + return True ctx.set_verify(SSL.VERIFY_PEER, ver) self.connection = SSL.Connection(ctx, self.connection) self.ssl_established = True @@ -338,6 +340,7 @@ class BaseHandler: try: if self.ssl_established: self.connection.shutdown() + self.connection.sock_shutdown(socket.SHUT_WR) else: self.connection.shutdown(socket.SHUT_WR) #Section 4.2.2.13 of RFC 1122 tells us that a close() with any pending readable data could lead to an immediate RST being sent. |