aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol2/http.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/protocol2/http.py')
-rw-r--r--libmproxy/protocol2/http.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/libmproxy/protocol2/http.py b/libmproxy/protocol2/http.py
index 2c8c8d27..5a25c317 100644
--- a/libmproxy/protocol2/http.py
+++ b/libmproxy/protocol2/http.py
@@ -268,10 +268,13 @@ class HttpLayer(Layer):
return
except (HttpErrorConnClosed, NetLibError, HttpError, ProtocolException) as e:
- self.send_to_client(make_error_response(
- getattr(e, "code", 502),
- repr(e)
- ))
+ try:
+ self.send_to_client(make_error_response(
+ getattr(e, "code", 502),
+ repr(e)
+ ))
+ except NetLibError:
+ pass
if isinstance(e, ProtocolException):
raise e
else: