From 8ce0de8bed5fbd2c42e7b43ee553e065e1c08a4c Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 25 Aug 2015 18:24:17 +0200 Subject: minor fixes --- libmproxy/protocol2/http.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libmproxy/protocol2') 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: -- cgit v1.2.3