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

Function h2_layer

test/mitmproxy/proxy/layers/http/test_http_fuzz.py:274–285  ·  view source on GitHub ↗
(opts)

Source from the content-addressed store, hash-verified

272
273
274def h2_layer(opts):
275 tctx = _tctx()
276 tctx.client.alpn = b"h2"
277
278 layer = http.HttpLayer(tctx, HTTPMode.regular)
279 for _ in layer.handle_event(Start()):
280 pass
281 for _ in layer.handle_event(
282 DataReceived(tctx.client, b"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n")
283 ):
284 pass
285 return tctx, layer
286
287
288def _h2_request(chunks):

Callers 1

_h2_requestFunction · 0.85

Calls 4

StartClass · 0.90
DataReceivedClass · 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…