diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2013-03-03 22:03:27 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2013-03-03 22:03:27 +1300 |
commit | cde66cd58470cd68a76a9d8b1022a45e99a5cd8d (patch) | |
tree | cbac0a374b930cfe459c4dda6e9c20dae62dbfb1 /libmproxy | |
parent | 8216801728ea2af82614025ca309a3b5db2ad982 (diff) | |
download | mitmproxy-cde66cd58470cd68a76a9d8b1022a45e99a5cd8d.tar.gz mitmproxy-cde66cd58470cd68a76a9d8b1022a45e99a5cd8d.tar.bz2 mitmproxy-cde66cd58470cd68a76a9d8b1022a45e99a5cd8d.zip |
Fuzzing, and fixes for errors found with fuzzing.
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: |