MCPcopy Create free account
hub / github.com/secdev/scapy / _parse_headers

Function _parse_headers

scapy/layers/http.py:245–255  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

243
244
245def _parse_headers(s):
246 headers = s.split(b"\r\n")
247 headers_found = {}
248 for header_line in headers:
249 try:
250 key, value = header_line.split(b":", 1)
251 except ValueError:
252 continue
253 header_key = _strip_header_name(key).lower()
254 headers_found[header_key] = (key, value.strip())
255 return headers_found
256
257
258def _parse_headers_and_body(s):

Callers 1

_parse_headers_and_bodyFunction · 0.85

Calls 1

_strip_header_nameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…