diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-08-01 10:39:14 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2015-08-01 12:40:40 +0200 |
commit | a837230320378d629ba9f25960b1dfd25c892ad9 (patch) | |
tree | eca444b3965abb294c6304ec41de2fbc307e240f /netlib/http/exceptions.py | |
parent | 199f2a44fed6b5f1c6fada6c96b981dfab5fded2 (diff) | |
download | mitmproxy-a837230320378d629ba9f25960b1dfd25c892ad9.tar.gz mitmproxy-a837230320378d629ba9f25960b1dfd25c892ad9.tar.bz2 mitmproxy-a837230320378d629ba9f25960b1dfd25c892ad9.zip |
move code from mitmproxy to netlib
Diffstat (limited to 'netlib/http/exceptions.py')
-rw-r--r-- | netlib/http/exceptions.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/netlib/http/exceptions.py b/netlib/http/exceptions.py index 8a2bbebc..45bd2dce 100644 --- a/netlib/http/exceptions.py +++ b/netlib/http/exceptions.py @@ -7,3 +7,16 @@ class HttpError(Exception): class HttpErrorConnClosed(HttpError): pass + + + +class HttpAuthenticationError(Exception): + def __init__(self, auth_headers=None): + super(HttpAuthenticationError, self).__init__( + "Proxy Authentication Required" + ) + self.headers = auth_headers + self.code = 407 + + def __repr__(self): + return "Proxy Authentication Required" |