MCPcopy Index your code
hub / github.com/python/cpython / validate_header_name

Function validate_header_name

Lib/email/_policybase.py:21–25  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

19valid_header_name_re = re.compile("[\041-\071\073-\176]+$")
20
21def validate_header_name(name):
22 # Validate header name according to RFC 5322
23 if not valid_header_name_re.match(name):
24 raise ValueError(
25 f"Header field name contains invalid characters: {name!r}")
26
27class _PolicyBase:
28

Callers 2

header_store_parseMethod · 0.90
header_store_parseMethod · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…