From 969595cca70edc4d02d5f676221267edf01e4252 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 13 Dec 2013 06:24:08 +0100 Subject: [PATCH] add requirements.txt, small changes --- netlib/http.py | 4 ++++ netlib/http_auth.py | 2 -- requirements.txt | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 requirements.txt diff --git a/netlib/http.py b/netlib/http.py index 7060b688b..e160bd790 100644 --- a/netlib/http.py +++ b/netlib/http.py @@ -233,6 +233,10 @@ def parse_init(line): def parse_init_connect(line): + """ + Returns (host, port, httpversion) if line is a valid CONNECT line. + http://tools.ietf.org/html/draft-luotonen-web-proxy-tunneling-01 section 3.1 + """ v = parse_init(line) if not v: return None diff --git a/netlib/http_auth.py b/netlib/http_auth.py index 69bee5c18..8f062826b 100644 --- a/netlib/http_auth.py +++ b/netlib/http_auth.py @@ -126,8 +126,6 @@ class AuthAction(Action): """ def __call__(self, parser, namespace, values, option_string=None): passman = self.getPasswordManager(values) - if not passman: - raise ArgumentTypeError("Error creating password manager for proxy authentication.") authenticator = BasicProxyAuth(passman, "mitmproxy") setattr(namespace, self.dest, authenticator) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..ede8bf4a3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +pyasn1>=0.1.7 +pyOpenSSL>=0.13 +nose>=1.3.0 +pathod>=0.9.2 \ No newline at end of file