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

Function _h2_response

test/mitmproxy/proxy/layers/http/test_http_fuzz.py:331–347  ·  view source on GitHub ↗
(chunks)

Source from the content-addressed store, hash-verified

329
330
331def _h2_response(chunks):
332 tctx = _tctx()
333 playbook = Playbook(http.HttpLayer(tctx, HTTPMode.regular), hooks=False)
334 server = Placeholder(connection.Server)
335 assert (
336 playbook
337 >> DataReceived(
338 tctx.client,
339 b"GET http://example.com/ HTTP/1.1\r\nHost: example.com\r\n\r\n",
340 )
341 << OpenConnection(server)
342 >> reply(None, side_effect=make_h2)
343 << SendData(server, Placeholder())
344 )
345 for chunk in chunks:
346 for _ in playbook.layer.handle_event(events.DataReceived(server(), chunk)):
347 pass
348
349
350# fmt: off

Callers 2

Calls 8

PlaybookClass · 0.90
PlaceholderFunction · 0.90
DataReceivedClass · 0.90
OpenConnectionClass · 0.90
replyClass · 0.90
SendDataClass · 0.90
_tctxFunction · 0.85
handle_eventMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…