Fuzzing, and fixes for errors found with fuzzing.

This commit is contained in:
Aldo Cortesi
2013-03-03 22:03:27 +13:00
parent 8216801728
commit cde66cd584
5 changed files with 33 additions and 10 deletions

View File

@@ -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: