mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-01 15:55:28 +00:00
minor fixes
This commit is contained in:
parent
56a4bc381e
commit
8ce0de8bed
@ -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:
|
||||
|
@ -100,6 +100,8 @@ class ConnectionHandler2:
|
||||
print("mitmproxy has crashed!", file=sys.stderr)
|
||||
print("Please lodge a bug report at: https://github.com/mitmproxy/mitmproxy", file=sys.stderr)
|
||||
|
||||
self.log("clientdisconnect", "info")
|
||||
|
||||
def finish(self):
|
||||
self.client_conn.finish()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user