MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / make_error_response

Function make_error_response

mitmproxy/proxy/layers/http/_http1.py:483–496  ·  view source on GitHub ↗
(
    status_code: int,
    message: str = "",
)

Source from the content-addressed store, hash-verified

481
482
483def make_error_response(
484 status_code: int,
485 message: str = "",
486) -> bytes:
487 resp = http.Response.make(
488 status_code,
489 format_error(status_code, message),
490 http.Headers(
491 Server=version.MITMPROXY,
492 Connection="close",
493 Content_Type="text/html",
494 ),
495 )
496 return http1.assemble_response(resp)
497
498
499__all__ = [

Callers 2

sendMethod · 0.85
read_headersMethod · 0.85

Calls 2

format_errorFunction · 0.85
makeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…