Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/mitmproxy/mitmproxy
/ _native
Function
_native
mitmproxy/http.py:40–41 ·
view source on GitHub ↗
(x: bytes)
Source
from the content-addressed store, hash-verified
38
39
# While headers _should_ be ASCII, it's not uncommon for certain headers to be utf-8 encoded.
40
def
_native(x: bytes) -> str:
41
return
x.decode(
"utf-8"
,
"surrogateescape"
)
42
43
44
def
_always_bytes(x: str | bytes) -> bytes:
Callers
3
__iter__
Method · 0.85
get_all
Method · 0.85
items
Method · 0.85
Calls
1
decode
Method · 0.45
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…