MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / _safe_header_value

Function _safe_header_value

uncommon_route/proxy.py:2014–2017  ·  view source on GitHub ↗
(value: object)

Source from the content-addressed store, hash-verified

2012
2013
2014def _safe_header_value(value: object) -> str:
2015 text = str(value).replace("\r", " ").replace("\n", " ")
2016 text = text.replace("→", "->").replace("—", "-")
2017 return text.encode("latin-1", errors="replace").decode("latin-1")
2018
2019
2020def _set_header(headers: dict[str, str], key: str, value: object) -> None:

Callers 1

_set_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected