From 975d1b87a3c0531e196084434a168644d9c187f9 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 17 Dec 2016 18:59:50 +0100 Subject: [PATCH] fix #1867 (#1873) --- mitmproxy/proxy/protocol/http.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mitmproxy/proxy/protocol/http.py b/mitmproxy/proxy/protocol/http.py index 50d64e174..59de070f6 100644 --- a/mitmproxy/proxy/protocol/http.py +++ b/mitmproxy/proxy/protocol/http.py @@ -1,6 +1,5 @@ import h2.exceptions import time -import traceback import enum from mitmproxy import connections # noqa @@ -431,7 +430,7 @@ class HttpLayer(base.Layer): response = http.make_error_response(code, message, headers) self.send_response(response) except (exceptions.NetlibException, h2.exceptions.H2Error, exceptions.Http2ProtocolException): - self.log(traceback.format_exc(), "debug") + self.log("Failed to send error response to client: {}".format(message), "debug") def change_upstream_proxy_server(self, address) -> None: # Make set_upstream_proxy_server always available,