diff options
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/proxy.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 75e195ea..7459fadf 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -237,6 +237,8 @@ class ProxyHandler(tcp.BaseHandler): continue else: raise + except http.HttpError, v: + raise ProxyError(502, "Invalid server response.") else: break @@ -278,7 +280,6 @@ class ProxyHandler(tcp.BaseHandler): ) else: self.log(cc, cc.error) - if isinstance(e, ProxyError): self.send_error(e.code, e.msg, e.headers) else: |