diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-06-11 16:13:22 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-06-15 15:51:01 +0200 |
commit | a0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e (patch) | |
tree | cf3b842c1ad8f7a75d6eb2ffa8063b5385407b5a /libpathod/pathoc.py | |
parent | 30fbf57e4b72e3947c323d98aee7b2d44663e33c (diff) | |
download | mitmproxy-a0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e.tar.gz mitmproxy-a0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e.tar.bz2 mitmproxy-a0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e.zip |
http2: add request-response to pathod
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r-- | libpathod/pathoc.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index e9bd5f56..9c021360 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -155,13 +155,14 @@ class Pathoc(tcp.TCPClient): # SSL ssl=None, sni=None, - sslversion=4, + sslversion='SSLv23', clientcert=None, ciphers=None, # HTTP/2 use_http2=False, http2_skip_connection_preface=False, + http2_framedump = False, # Websockets ws_read_limit = None, @@ -199,6 +200,7 @@ class Pathoc(tcp.TCPClient): self.use_http2 = use_http2 self.http2_skip_connection_preface = http2_skip_connection_preface + self.http2_framedump = http2_framedump self.ws_read_limit = ws_read_limit @@ -219,7 +221,6 @@ class Pathoc(tcp.TCPClient): if not OpenSSL._util.lib.Cryptography_HAS_ALPN: # pragma: nocover print >> sys.stderr, "HTTP/2 requires ALPN support. Please use OpenSSL >= 1.0.2." print >> sys.stderr, "Pathoc might not be working as expected without ALPN." - self.protocol = http2.HTTP2Protocol(self) else: # TODO: create HTTP or Websockets protocol @@ -298,7 +299,7 @@ class Pathoc(tcp.TCPClient): if self.use_http2: self.protocol.check_alpn() if not self.http2_skip_connection_preface: - self.protocol.perform_connection_preface() + self.protocol.perform_client_connection_preface() if self.timeout: self.settimeout(self.timeout) @@ -466,6 +467,7 @@ def main(args): # pragma: nocover ciphers = args.ciphers, use_http2 = args.use_http2, http2_skip_connection_preface = args.http2_skip_connection_preface, + http2_framedump = args.http2_framedump, showreq = args.showreq, showresp = args.showresp, explain = args.explain, |