MCPcopy
hub / github.com/mitmproxy/mitmproxy / error

Function error

examples/contrib/suppress_error_responses.py:12–17  ·  view source on GitHub ↗

Kills the flow if it has an error different to HTTPSyntaxException. Sometimes, web scanners generate malformed HTTP syntax on purpose and we do not want to kill these requests.

(self, flow: http.HTTPFlow)

Source from the content-addressed store, hash-verified

10
11
12def error(self, flow: http.HTTPFlow):
13 """Kills the flow if it has an error different to HTTPSyntaxException.
14 Sometimes, web scanners generate malformed HTTP syntax on purpose and we do not want to kill these requests.
15 """
16 if flow.error is not None and not isinstance(flow.error, HttpSyntaxException):
17 flow.kill()

Callers

nothing calls this directly

Calls 1

killMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…