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

Method passthrough

mitmproxy/proxy/layers/http/_http1.py:161–169  ·  view source on GitHub ↗
(self, event: events.Event)

Source from the content-addressed store, hash-verified

159 yield from self.state(events.DataReceived(self.conn, already_received))
160
161 def passthrough(self, event: events.Event) -> layer.CommandGenerator[None]:
162 assert self.stream_id
163 if isinstance(event, events.DataReceived):
164 yield ReceiveHttp(self.ReceiveData(self.stream_id, event.data))
165 elif isinstance(event, events.ConnectionClosed):
166 if isinstance(self, Http1Server):
167 yield ReceiveHttp(RequestEndOfMessage(self.stream_id))
168 else:
169 yield ReceiveHttp(ResponseEndOfMessage(self.stream_id))
170
171 def mark_done(
172 self, *, request: bool = False, response: bool = False

Callers

nothing calls this directly

Calls 3

ReceiveHttpClass · 0.90
RequestEndOfMessageClass · 0.85

Tested by

no test coverage detected