MCPcopy
hub / github.com/tornadoweb/tornado / headers_parse_simple

Function headers_parse_simple

maint/benchmark/parsing_benchmark.py:49–56  ·  view source on GitHub ↗
(headers: str)

Source from the content-addressed store, hash-verified

47
48
49def headers_parse_simple(headers: str) -> HTTPHeaders:
50 h = HTTPHeaders()
51 for line in headers.split("\n"):
52 if line.endswith("\r"):
53 line = line[:-1]
54 if line:
55 h.parse_line(line)
56 return h
57
58
59def run_headers_split():

Callers 1

run_headers_fullFunction · 0.85

Calls 3

parse_lineMethod · 0.95
HTTPHeadersClass · 0.90
splitMethod · 0.80

Tested by

no test coverage detected