aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-03-04 15:12:29 +0100
committerGitHub <noreply@github.com>2017-03-04 15:12:29 +0100
commit2a1ed7f3ebd7281cef660b9615bd1bb544e2a125 (patch)
treed8925d1c5719c2586174f2dfa6e7d200789ba734
parent1bafe73a94f84e377ebfd25e09302f7427146ef7 (diff)
parentfc3848345bce893918bb532216b4598fea2f574b (diff)
downloadmitmproxy-2a1ed7f3ebd7281cef660b9615bd1bb544e2a125.tar.gz
mitmproxy-2a1ed7f3ebd7281cef660b9615bd1bb544e2a125.tar.bz2
mitmproxy-2a1ed7f3ebd7281cef660b9615bd1bb544e2a125.zip
Merge pull request #2082 from tarnacious/master
Call error handler and mark flow on HTTPException
-rw-r--r--mitmproxy/proxy/protocol/http.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mitmproxy/proxy/protocol/http.py b/mitmproxy/proxy/protocol/http.py
index b6f8463d..d2f6d374 100644
--- a/mitmproxy/proxy/protocol/http.py
+++ b/mitmproxy/proxy/protocol/http.py
@@ -276,6 +276,8 @@ class HttpLayer(base.Layer):
# We optimistically guess there might be an HTTP client on the
# other end
self.send_error_response(400, repr(e))
+ f.error = flow.Error(str(e))
+ self.channel.ask("error", f)
raise exceptions.ProtocolException(
"HTTP protocol error in client request: {}".format(e)
)