diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-07-15 22:04:25 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-07-22 15:30:33 +0200 |
commit | 2b0465dbb93dd4bf0d6db366db597c05e92121d8 (patch) | |
tree | 5bbb540800a154e840334b2c2141581ecb03de26 /libpathod/pathoc.py | |
parent | a2bf19125a92a4fa372708cf2cda7887ab62ac76 (diff) | |
download | mitmproxy-2b0465dbb93dd4bf0d6db366db597c05e92121d8.tar.gz mitmproxy-2b0465dbb93dd4bf0d6db366db597c05e92121d8.tar.bz2 mitmproxy-2b0465dbb93dd4bf0d6db366db597c05e92121d8.zip |
use new netlib module names
Diffstat (limited to 'libpathod/pathoc.py')
-rw-r--r-- | libpathod/pathoc.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index 7f7cbb87..89b0e0c9 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -11,7 +11,8 @@ import threading import OpenSSL.crypto -from netlib import tcp, http, http2, http_semantics, certutils, websockets, socks +from netlib import tcp, http, certutils, websockets, socks +from netlib.http import http1, http2 import language.http import language.websockets @@ -228,12 +229,12 @@ class Pathoc(tcp.TCPClient): l = self.rfile.readline() if not l: raise PathocError("Proxy CONNECT failed") - parsed = http.parse_response_line(l) + parsed = http.http1.parse_response_line(l) if not parsed[1] == 200: raise PathocError( "Proxy CONNECT failed: %s - %s" % (parsed[1], parsed[2]) ) - http.read_headers(self.rfile) + http.http1.read_headers(self.rfile) def socks_connect(self, connect_to): try: @@ -410,9 +411,9 @@ class Pathoc(tcp.TCPClient): if self.use_http2: status_code, headers, body = self.protocol.read_response() - resp = http_semantics.Response("HTTP/2", status_code, "", headers, body, self.sslinfo) + resp = http.Response("HTTP/2", status_code, "", headers, body, self.sslinfo) else: - resp = http.read_response( + resp = http.http1.read_response( self.rfile, req["method"], None |