MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / HttpErrorHook

Class HttpErrorHook

mitmproxy/proxy/layers/http/_hooks.py:56–66  ·  view source on GitHub ↗

An HTTP error has occurred, e.g. invalid server responses, or interrupted connections. This is distinct from a valid server HTTP error response, which is simply a response with an HTTP error code. Every flow will receive either an error or an response event, but not both.

Source from the content-addressed store, hash-verified

54
55@dataclass
56class HttpErrorHook(commands.StartHook):
57 """
58 An HTTP error has occurred, e.g. invalid server responses, or
59 interrupted connections. This is distinct from a valid server HTTP
60 error response, which is simply a response with an HTTP error code.
61
62 Every flow will receive either an error or an response event, but not both.
63 """
64
65 name = "error"
66 flow: http.HTTPFlow
67
68
69@dataclass

Callers 4

check_body_sizeMethod · 0.85
check_invalidMethod · 0.85
check_killedMethod · 0.85
handle_protocol_errorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…